Index: test/mjsunit/boolean.js |
diff --git a/test/mjsunit/boolean.js b/test/mjsunit/boolean.js |
index d955855d3aa6a610f1ded3a09a195372015305ec..9b9edd2e019a4b6cab9bc2672e10d7ea00d8ea5b 100644 |
--- a/test/mjsunit/boolean.js |
+++ b/test/mjsunit/boolean.js |
@@ -72,3 +72,10 @@ assertEquals('foo', o.p || false); |
assertEquals('foo', o.p || (o.p == 0)); |
assertEquals('foo', o.p || (o.p == null)); |
assertEquals('foo', o.p || (o.p == o.p)); |
+ |
+// JSToBoolean(x:string) |
+function f(x) { return !!("" + x); } |
+assertEquals(false, f("")); |
+assertEquals(true, f("narf")); |
+assertEquals(true, f(12345678)); |
+assertEquals(true, f(undefined)); |