Index: test/mjsunit/es6/symbols.js |
diff --git a/test/mjsunit/es6/symbols.js b/test/mjsunit/es6/symbols.js |
index 46c3daba8a177c6dce414b1efe6e1c334e2aa147..7203f67a87ca6a5229c03169e2986d5712f9608d 100644 |
--- a/test/mjsunit/es6/symbols.js |
+++ b/test/mjsunit/es6/symbols.js |
@@ -504,3 +504,33 @@ function TestGetOwnPropertySymbolsOnPrimitives() { |
assertEquals(Object.getOwnPropertySymbols("OK"), []); |
} |
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); |
+} |
+TestComparison(); |