Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: test/cctest/test-ast.cc

Issue 2545773003: Remove unused code, AstValueFactory::ConcatStrings. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/ast-value-factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-ast.cc
diff --git a/test/cctest/test-ast.cc b/test/cctest/test-ast.cc
index dfb4d11236ba06b21829ecdc7d1600e94f2f8984..aa786ce3ce446364c76e5783bf7c596ee52b442d 100644
--- a/test/cctest/test-ast.cc
+++ b/test/cctest/test-ast.cc
@@ -59,43 +59,3 @@ TEST(List) {
CHECK_EQ(0, list->length());
delete list;
}
-
-TEST(ConcatStrings) {
- v8::internal::AccountingAllocator allocator;
- Zone zone(&allocator, ZONE_NAME);
- AstValueFactory value_factory(&zone, 0);
-
- const AstRawString* one_byte = value_factory.GetOneByteString("a");
-
- uint16_t two_byte_buffer[] = {
- 0x3b1,
- };
- const AstRawString* two_byte = value_factory.GetTwoByteString(
- Vector<const uint16_t>(two_byte_buffer, 1));
-
- const AstRawString* expectation = value_factory.GetOneByteString("aa");
- const AstRawString* result = value_factory.ConcatStrings(one_byte, one_byte);
- CHECK(result->is_one_byte());
- CHECK_EQ(expectation, result);
-
- uint16_t expectation_buffer_one_two[] = {'a', 0x3b1};
- expectation = value_factory.GetTwoByteString(
- Vector<const uint16_t>(expectation_buffer_one_two, 2));
- result = value_factory.ConcatStrings(one_byte, two_byte);
- CHECK(!result->is_one_byte());
- CHECK_EQ(expectation, result);
-
- uint16_t expectation_buffer_two_one[] = {0x3b1, 'a'};
- expectation = value_factory.GetTwoByteString(
- Vector<const uint16_t>(expectation_buffer_two_one, 2));
- result = value_factory.ConcatStrings(two_byte, one_byte);
- CHECK(!result->is_one_byte());
- CHECK_EQ(expectation, result);
-
- uint16_t expectation_buffer_two_two[] = {0x3b1, 0x3b1};
- expectation = value_factory.GetTwoByteString(
- Vector<const uint16_t>(expectation_buffer_two_two, 2));
- result = value_factory.ConcatStrings(two_byte, two_byte);
- CHECK(!result->is_one_byte());
- CHECK_EQ(expectation, result);
-}
« no previous file with comments | « src/ast/ast-value-factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698