Skip to content

Commit 91b4908

Browse files
committed
add windows printf output style to other.test_js_optimizer
1 parent 6badff6 commit 91b4908

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;
4+
a = +x;
5+
a = 17;
6+
a = +44;
7+
a = +44;
8+
a = +44.9;
9+
a = +1278e3;
10+
a = +12e10;
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;
20+
a = +-44;
21+
a = +-44;
22+
a = +-44.9;
23+
a = +-1278e3;
24+
a = +-12e10;
25+
a = +0x8000000000000000;
26+
a = +-0x8000000000000000;
27+
a = -+0x8000000000000000;
28+
a = -0x8000000000000000;
29+
a = +0xde0b6b000000000;
30+
a = +-0xde0b6b000000000;
31+
a = -+0xde0b6b000000000;
32+
a = -0xde0b6b000000000;
33+
a = +11234567890123457e5;
34+
f(g() | 0);
35+
x = 17976931348623157e292;
36+
a = 9007199254740992;
37+
a = 9007199254740992;
38+
a = 9007199254740994;
39+
return +12e10;
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
@@ -1912,7 +1912,7 @@ def test_js_optimizer(self):
19121912
['asm', 'asmPreciseF32', 'simplifyExpressions', 'optimizeFrounds']),
19131913
(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-pre-f32.js'), open(path_from_root('tests', 'optimizer', 'test-js-optimizer-asm-pre-output-f32-nosimp.js')).read(),
19141914
['asm', 'asmPreciseF32', 'optimizeFrounds']),
1915-
(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()],
1915+
(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']),
19171917
(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()],
19181918
['asm', 'asmLastOpts', 'last']),

0 commit comments

Comments
 (0)