Skip to content

Commit 1cc2609

Browse files
committed
add two files for CI testing
- this may not be needed, check later
1 parent 460194c commit 1cc2609

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed

jscomp/test/flow_parser_sample.js

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
'use strict';
2+
3+
var Mt = require("./mt");
4+
var Block = require("../../lib/js/block");
5+
var Ext_list = require("./ext_list");
6+
7+
var suites_000 = /* tuple */[
8+
"drop",
9+
function () {
10+
return /* Eq */Block.__(0, [
11+
Ext_list.drop(3, /* :: */[
12+
0,
13+
/* :: */[
14+
1,
15+
/* :: */[
16+
2,
17+
/* [] */0
18+
]
19+
]
20+
]),
21+
/* [] */0
22+
]);
23+
}
24+
];
25+
26+
var suites_001 = /* :: */[
27+
/* tuple */[
28+
"drop1",
29+
function () {
30+
return /* Eq */Block.__(0, [
31+
Ext_list.drop(2, /* :: */[
32+
0,
33+
/* :: */[
34+
1,
35+
/* :: */[
36+
2,
37+
/* [] */0
38+
]
39+
]
40+
]),
41+
/* :: */[
42+
2,
43+
/* [] */0
44+
]
45+
]);
46+
}
47+
],
48+
/* :: */[
49+
/* tuple */[
50+
"flat_map",
51+
function () {
52+
return /* Eq */Block.__(0, [
53+
/* :: */[
54+
0,
55+
/* :: */[
56+
0,
57+
/* :: */[
58+
1,
59+
/* :: */[
60+
1,
61+
/* :: */[
62+
0,
63+
/* [] */0
64+
]
65+
]
66+
]
67+
]
68+
],
69+
Ext_list.flat_map(function (x) {
70+
if (x % 2) {
71+
return /* :: */[
72+
1,
73+
/* :: */[
74+
1,
75+
/* [] */0
76+
]
77+
];
78+
}
79+
else {
80+
return /* :: */[
81+
0,
82+
/* [] */0
83+
];
84+
}
85+
}, /* :: */[
86+
0,
87+
/* :: */[
88+
0,
89+
/* :: */[
90+
3,
91+
/* :: */[
92+
0,
93+
/* [] */0
94+
]
95+
]
96+
]
97+
])
98+
]);
99+
}
100+
],
101+
/* [] */0
102+
]
103+
];
104+
105+
var suites = /* :: */[
106+
suites_000,
107+
suites_001
108+
];
109+
110+
Mt.from_pair_suites("a_list_test.ml", suites);
111+
112+
exports.suites = suites;
113+
/* Not a pure module */

jscomp/test/joinClasses.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = function(){
2+
var sum = 0 ;
3+
var i = 0;
4+
for(; i < arguments.length ; ++ i){
5+
sum += arguments[i]
6+
}
7+
return sum
8+
}

0 commit comments

Comments
 (0)