@@ -17,19 +17,16 @@ Deno.test("AST all distinct", () => {
1717 }
1818 }
1919} ) ;
20-
2120Deno . test ( "parser all error" , ( ) => {
2221 for ( const sentence of MALFORMED_SENTENCES ) {
2322 assertThrows ( ( ) => parser . parse ( sentence ) . unwrap ( ) ) ;
2423 }
2524} ) ;
26-
2725Deno . test ( "ucsur have proper length" , ( ) => {
2826 assertEquals ( PU . length , 120 ) ;
2927 assertEquals ( KU_SULI . length , 17 ) ;
3028 assertEquals ( KU_LILI . length , 4 ) ;
3129} ) ;
32-
3330Deno . test ( "ucsur ordered" , ( ) => {
3431 for ( const [ i , word ] of PU . entries ( ) ) {
3532 if ( i < PU . length - 1 ) {
@@ -38,19 +35,16 @@ Deno.test("ucsur ordered", () => {
3835 }
3936 }
4037} ) ;
41-
4238Deno . test ( "no ali" , ( ) => {
4339 for ( const word of PU ) {
4440 assertNotEquals ( word , "ali" ) ;
4541 }
4642} ) ;
47-
4843function uniquePairs < T > (
4944 array : ReadonlyArray < T > ,
5045) : ReadonlyArray < readonly [ T , T ] > {
5146 return array . flatMap ( ( a , i ) => array . slice ( i + 1 ) . map ( ( b ) => [ a , b ] ) ) ;
5247}
53-
5448Deno . test ( "small parser" , ( ) => {
5549 const space = match ( / \s * / , "space" ) ;
5650 const parser = sequence (
@@ -60,13 +54,11 @@ Deno.test("small parser", () => {
6054 ) ;
6155 assertEquals ( parser . parse ( "toki pona a" ) . unwrap ( ) , [ [ "toki" , "pona" , "a" ] ] ) ;
6256} ) ;
63-
6457Deno . test ( "many" , ( ) => {
6558 const space = match ( / \s * / , "space" ) ;
6659 const parser = many ( matchString ( "a" ) . skip ( space ) ) . skip ( end ) ;
6760 assertEquals ( parser . parse ( "a a a" ) . unwrap ( ) , [ [ "a" , "a" , "a" ] ] ) ;
6861} ) ;
69-
7062Deno . test ( "all" , ( ) => {
7163 const space = match ( / \s * / , "space" ) ;
7264 const parser = all ( matchString ( "a" ) . skip ( space ) ) . skip ( end ) ;
0 commit comments