Skip to content

Commit 6607973

Browse files
committed
rename test and more cases
1 parent 2c05e5a commit 6607973

File tree

4 files changed

+92
-47
lines changed

4 files changed

+92
-47
lines changed

tests/tests/src/generic_infix_test.mjs

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/tests/src/generic_infix_test.res

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/tests/src/unified_ops_test.mjs

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// Generated by ReScript, PLEASE EDIT WITH CARE
2+
3+
4+
let float = 1 + 2;
5+
6+
let string = "12";
7+
8+
let bigint = 1n + 2n;
9+
10+
function unknown(a, b) {
11+
return a + b | 0;
12+
}
13+
14+
function lhsint(a, b) {
15+
return a + b | 0;
16+
}
17+
18+
function lhsfloat(a, b) {
19+
return a + b;
20+
}
21+
22+
function lhsbigint(a, b) {
23+
return a + b;
24+
}
25+
26+
function lhsstring(a, b) {
27+
return a + b;
28+
}
29+
30+
function rhsint(a, b) {
31+
return a + b | 0;
32+
}
33+
34+
function rhsfloat(a, b) {
35+
return a + b;
36+
}
37+
38+
function rhsbigint(a, b) {
39+
return a + b;
40+
}
41+
42+
function rhsstring(a, b) {
43+
return a + b;
44+
}
45+
46+
function case1(a) {
47+
return 1 + a | 0;
48+
}
49+
50+
function case2(a, b) {
51+
return a + "test" + b;
52+
}
53+
54+
let int = 3;
55+
56+
export {
57+
int,
58+
float,
59+
string,
60+
bigint,
61+
unknown,
62+
lhsint,
63+
lhsfloat,
64+
lhsbigint,
65+
lhsstring,
66+
rhsint,
67+
rhsfloat,
68+
rhsbigint,
69+
rhsstring,
70+
case1,
71+
case2,
72+
}
73+
/* No side effect */

tests/tests/src/unified_ops_test.res

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
let int = 1 + 2
2+
let float = 1. + 2.
3+
let string = "1" + "2"
4+
let bigint = 1n + 2n
5+
6+
let unknown = (a, b) => a + b
7+
8+
let lhsint = (a: int, b) => a + b
9+
let lhsfloat = (a: float, b) => a + b
10+
let lhsbigint = (a: bigint, b) => a + b
11+
let lhsstring = (a: string, b) => a + b
12+
13+
let rhsint = (a, b: int) => a + b
14+
let rhsfloat = (a, b: float) => a + b
15+
let rhsbigint = (a, b: bigint) => a + b
16+
let rhsstring = (a, b: string) => a + b
17+
18+
let case1 = a => 1 + a
19+
let case2 = (a, b) => a + "test" + b

0 commit comments

Comments
 (0)