Index: test/cctest/test-strings.cc |
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc |
index 22a830295a70e19bdf5cc5c1af2931f1b98d3a98..11af3384b95fa13cc14b9b042785136c019008ab 100644 |
--- a/test/cctest/test-strings.cc |
+++ b/test/cctest/test-strings.cc |
@@ -1083,7 +1083,9 @@ TEST(SliceFromCons) { |
CHECK(parent->IsFlat()); |
CHECK(slice->IsSlicedString()); |
CHECK_EQ(SlicedString::cast(*slice)->parent(), |
- ConsString::cast(*parent)->first()); |
+ // Parent could have been short-circuited. |
+ parent->IsConsString() ? ConsString::cast(*parent)->first() |
+ : *parent); |
CHECK(SlicedString::cast(*slice)->parent()->IsSeqString()); |
CHECK(slice->IsFlat()); |
} |