Index: test/cctest/compiler/test-js-typed-lowering.cc |
diff --git a/test/cctest/compiler/test-js-typed-lowering.cc b/test/cctest/compiler/test-js-typed-lowering.cc |
index d48a462c1f3b38a95d4b353eaed548cfa5f10636..8a78c9386e27dfa03dc8bdb2acf4c86b89b897b1 100644 |
--- a/test/cctest/compiler/test-js-typed-lowering.cc |
+++ b/test/cctest/compiler/test-js-typed-lowering.cc |
@@ -508,8 +508,12 @@ TEST(JSToBoolean) { |
{ // ToBoolean(string) |
Node* r = R.ReduceUnop(op, Type::String()); |
- // TODO(titzer): test will break with better js-typed-lowering |
- CHECK_EQ(IrOpcode::kJSToBoolean, r->opcode()); |
+ CHECK_EQ(IrOpcode::kBooleanNot, r->opcode()); |
+ Node* i = r->InputAt(0); |
+ CHECK_EQ(IrOpcode::kNumberEqual, i->opcode()); |
+ Node* j = i->InputAt(0); |
+ CHECK_EQ(IrOpcode::kLoadField, j->opcode()); |
+ // ToBoolean(x:string) => BooleanNot(NumberEqual(x.length, #0)) |
} |
{ // ToBoolean(object) |