Index: test/mjsunit/es6/symbols.js |
diff --git a/test/mjsunit/es6/symbols.js b/test/mjsunit/es6/symbols.js |
index 7203f67a87ca6a5229c03169e2986d5712f9608d..05601bd75eedd5a75843734a634063c6441a725e 100644 |
--- a/test/mjsunit/es6/symbols.js |
+++ b/test/mjsunit/es6/symbols.js |
@@ -507,30 +507,22 @@ TestGetOwnPropertySymbolsOnPrimitives(); |
function TestComparison() { |
- function f() { |
- var a = Symbol(); |
- a < a; |
- a > a; |
- a <= a; |
- a >= a; |
- } |
- |
- assertThrows(f, TypeError); |
- %OptimizeFunctionOnNextCall(f); |
- assertThrows(f, TypeError); |
- assertThrows(f, TypeError); |
- |
- function g() { |
- var a = Symbol(); |
- var b = Symbol(); |
- a < b; |
- a > b; |
- a <= b; |
- a >= b; |
- } |
- assertThrows(g, TypeError); |
- %OptimizeFunctionOnNextCall(g); |
- assertThrows(g, TypeError); |
- assertThrows(g, TypeError); |
+ function lt() { var a = Symbol(); var b = Symbol(); a < b; } |
+ function gt() { var a = Symbol(); var b = Symbol(); a > b; } |
+ function le() { var a = Symbol(); var b = Symbol(); a <= b; } |
+ function ge() { var a = Symbol(); var b = Symbol(); a >= b; } |
+ function lt_same() { var a = Symbol(); a < a; } |
+ function gt_same() { var a = Symbol(); a > a; } |
+ function le_same() { var a = Symbol(); a <= a; } |
+ function ge_same() { var a = Symbol(); a >= a; } |
+ |
+ var throwFuncs = [lt, gt, le, ge, lt_same, gt_same, le_same, ge_same]; |
+ |
+ for (var f of throwFuncs) { |
+ assertThrows(f, TypeError); |
+ %OptimizeFunctionOnNextCall(f); |
+ assertThrows(f, TypeError); |
+ assertThrows(f, TypeError); |
+ } |
} |
TestComparison(); |