Skip to content

Commit d49c338

Browse files
committed
add more windows printf output style to other.test_js_optimizer
1 parent 4301fa6 commit d49c338

File tree

2 files changed

+108
-1
lines changed

2 files changed

+108
-1
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
function finall(x) {
2+
x = +x;
3+
var a = 5.0;
4+
a = +x;
5+
a = 17;
6+
a = 44.0;
7+
a = 44.0;
8+
a = 44.9;
9+
a = 1278.0e3;
10+
a = 12.0e10;
11+
a = -x;
12+
a = -17;
13+
a = -44;
14+
a = -44;
15+
a = -44.9;
16+
a = -1278e3;
17+
a = -12e10;
18+
a = +-x;
19+
a = -17.0;
20+
a = -44.0;
21+
a = -44.0;
22+
a = -44.9;
23+
a = -1278.0e3;
24+
a = -12.0e10;
25+
a = 9223372036854775808.0;
26+
a = -9223372036854775808.0;
27+
a = -9223372036854775808.0;
28+
a = -9223372036854775808;
29+
a = 999999984306749440.0;
30+
a = -999999984306749440.0;
31+
a = -999999984306749440.0;
32+
a = -999999984306749440;
33+
a = 11234567890123457.0e5;
34+
f(g() | 0);
35+
x = 17976931348623157e292;
36+
a = 9007199254740992;
37+
a = 9007199254740992;
38+
a = 9007199254740994;
39+
return 12.0e10;
40+
}
41+
function looop() {
42+
do do_it(); while (!condition());
43+
do do_it(); while (!(a > b));
44+
do do_it(); while (x());
45+
while (1) {
46+
do_it();
47+
if (a()) continue;
48+
if (!x()) break;
49+
}
50+
do {
51+
do_it();
52+
do if (a()) continue; while (b());
53+
} while (x());
54+
do {
55+
do_it();
56+
while (b()) if (a()) continue;
57+
} while (x());
58+
X : while (1) {
59+
do_it();
60+
while (b()) if (a()) continue X;
61+
if (!x()) break;
62+
}
63+
do blah(); while (!shah());
64+
a = b;
65+
LABELED : while (1) {
66+
blah();
67+
if (shah()) {
68+
c = d;
69+
break;
70+
}
71+
}
72+
while (1) {
73+
blah();
74+
if (check) break;
75+
if (shah()) {
76+
e = f;
77+
break;
78+
}
79+
}
80+
do {
81+
blah();
82+
while (1) if (check) break;
83+
} while (!shah());
84+
g = h;
85+
if (a) waka();
86+
if (a) waka(); else wala();
87+
if (a) if (a) waka(); else wala();
88+
if (a) {
89+
if (a) waka();
90+
} else other();
91+
if (a) if (a) waka(); else wala(); else other();
92+
}
93+
function conditions() {
94+
if (HEAP32[$incdec_ptr71_i + 8 >> 2] | 0) shoo();
95+
if (x == 0) y();
96+
if (!x) y();
97+
if (!y) z();
98+
if (x != 0) y();
99+
if (x) y();
100+
if (y) z();
101+
if (x) y();
102+
if (!x) y();
103+
if (!(s() | 0)) z();
104+
if (x + 4 | 0) y();
105+
if (x & 4) y();
106+
}
107+

tests/test_other.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1914,7 +1914,7 @@ def test_js_optimizer(self):
19141914
['asm', 'asmPreciseF32', 'optimizeFrounds']),
19151915
(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last.js'), [open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-lastOpts-output.js')).read(), open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-lastOpts-output2.js')).read(), open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-lastOpts-output3.js')).read()],
19161916
['asm', 'asmLastOpts']),
1917-
(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last.js'), [open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last-output.js')).read(), open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last-output2.js')).read()],
1917+
(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last.js'), [open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last-output.js')).read(), open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last-output2.js')).read(), open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-last-output3.js')).read()],
19181918
['asm', 'asmLastOpts', 'last']),
19191919
(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-relocate.js'), open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-relocate-output.js')).read(),
19201920
['asm', 'relocate']),

0 commit comments

Comments
 (0)