Index: test/unittests/compiler/js-intrinsic-lowering-unittest.cc |
diff --git a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc |
index 99f45749608eadd5b040d273b15bd53ff8c551c8..92be4e43e0b129c3afaf713407004cc969baf1e8 100644 |
--- a/test/unittests/compiler/js-intrinsic-lowering-unittest.cc |
+++ b/test/unittests/compiler/js-intrinsic-lowering-unittest.cc |
@@ -122,6 +122,23 @@ |
input, context, effect, control)); |
ASSERT_TRUE(r.Changed()); |
EXPECT_THAT(r.replacement(), IsObjectIsSmi(input)); |
+} |
+ |
+ |
+// ----------------------------------------------------------------------------- |
+// %_IsNonNegativeSmi |
+ |
+ |
+TEST_F(JSIntrinsicLoweringTest, InlineIsNonNegativeSmi) { |
+ Node* const input = Parameter(0); |
+ Node* const context = Parameter(1); |
+ Node* const effect = graph()->start(); |
+ Node* const control = graph()->start(); |
+ Reduction const r = Reduce(graph()->NewNode( |
+ javascript()->CallRuntime(Runtime::kInlineIsNonNegativeSmi, 1), input, |
+ context, effect, control)); |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), IsObjectIsNonNegativeSmi(input)); |
} |