@@ -5,7 +5,10 @@ exports.js_c_style_enum = () => {
5
5
assert . strictEqual ( wasm . Color . Green , 0 ) ;
6
6
assert . strictEqual ( wasm . Color . Yellow , 1 ) ;
7
7
assert . strictEqual ( wasm . Color . Red , 2 ) ;
8
- assert . strictEqual ( Object . keys ( wasm . Color ) . length , 3 ) ;
8
+ assert . strictEqual ( wasm . Color [ 0 ] , 'Green' ) ;
9
+ assert . strictEqual ( wasm . Color [ 1 ] , 'Yellow' ) ;
10
+ assert . strictEqual ( wasm . Color [ 2 ] , 'Red' ) ;
11
+ assert . strictEqual ( Object . keys ( wasm . Color ) . length , 6 ) ;
9
12
10
13
assert . strictEqual ( wasm . enum_cycle ( wasm . Color . Green ) , wasm . Color . Yellow ) ;
11
14
} ;
@@ -14,7 +17,10 @@ exports.js_c_style_enum_with_custom_values = () => {
14
17
assert . strictEqual ( wasm . ColorWithCustomValues . Green , 21 ) ;
15
18
assert . strictEqual ( wasm . ColorWithCustomValues . Yellow , 34 ) ;
16
19
assert . strictEqual ( wasm . ColorWithCustomValues . Red , 2 ) ;
17
- assert . strictEqual ( Object . keys ( wasm . ColorWithCustomValues ) . length , 3 ) ;
20
+ assert . strictEqual ( wasm . ColorWithCustomValues [ 21 ] , 'Green' ) ;
21
+ assert . strictEqual ( wasm . ColorWithCustomValues [ 34 ] , 'Yellow' ) ;
22
+ assert . strictEqual ( wasm . ColorWithCustomValues [ 2 ] , 'Red' ) ;
23
+ assert . strictEqual ( Object . keys ( wasm . ColorWithCustomValues ) . length , 6 ) ;
18
24
19
25
assert . strictEqual ( wasm . enum_with_custom_values_cycle ( wasm . ColorWithCustomValues . Green ) , wasm . ColorWithCustomValues . Yellow ) ;
20
26
} ;
0 commit comments