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

Side by Side Diff: test/cctest/test-api.cc

Issue 12681006: Fix tests that fail on GC stress tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/test-strings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 16040 matching lines...) Expand 10 before | Expand all | Expand 10 after
16051 16051
16052 i::String::WriteToFlat(*flat_string, uc16_buffer, 0, length); 16052 i::String::WriteToFlat(*flat_string, uc16_buffer, 0, length);
16053 uc16_buffer[length] = 0; 16053 uc16_buffer[length] = 0;
16054 16054
16055 TestResource resource(uc16_buffer); 16055 TestResource resource(uc16_buffer);
16056 16056
16057 flat_string->MakeExternal(&resource); 16057 flat_string->MakeExternal(&resource);
16058 16058
16059 CHECK(flat_string->IsTwoByteRepresentation()); 16059 CHECK(flat_string->IsTwoByteRepresentation());
16060 16060
16061 // At this point, we should have a Cons string which is flat and ASCII, 16061 // If the cons string has been short-circuited, skip the following checks.
16062 // with a first half that is a two-byte string (although it only contains 16062 if (!string.is_identical_to(flat_string)) {
16063 // ASCII characters). This is a valid sequence of steps, and it can happen 16063 // At this point, we should have a Cons string which is flat and ASCII,
16064 // in real pages. 16064 // with a first half that is a two-byte string (although it only contains
16065 16065 // ASCII characters). This is a valid sequence of steps, and it can happen
16066 CHECK(string->IsOneByteRepresentation()); 16066 // in real pages.
16067 i::ConsString* cons = i::ConsString::cast(*string); 16067 CHECK(string->IsOneByteRepresentation());
16068 CHECK_EQ(0, cons->second()->length()); 16068 i::ConsString* cons = i::ConsString::cast(*string);
16069 CHECK(cons->first()->IsTwoByteRepresentation()); 16069 CHECK_EQ(0, cons->second()->length());
16070 CHECK(cons->first()->IsTwoByteRepresentation());
16071 }
16070 16072
16071 // Check that some string operations work. 16073 // Check that some string operations work.
16072 16074
16073 // Atom RegExp. 16075 // Atom RegExp.
16074 Local<Value> reresult = CompileRun("str2.match(/abel/g).length;"); 16076 Local<Value> reresult = CompileRun("str2.match(/abel/g).length;");
16075 CHECK_EQ(6, reresult->Int32Value()); 16077 CHECK_EQ(6, reresult->Int32Value());
16076 16078
16077 // Nonatom RegExp. 16079 // Nonatom RegExp.
16078 reresult = CompileRun("str2.match(/abe./g).length;"); 16080 reresult = CompileRun("str2.match(/abe./g).length;");
16079 CHECK_EQ(6, reresult->Int32Value()); 16081 CHECK_EQ(6, reresult->Int32Value());
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
18321 i::Semaphore* sem_; 18323 i::Semaphore* sem_;
18322 volatile int sem_value_; 18324 volatile int sem_value_;
18323 }; 18325 };
18324 18326
18325 18327
18326 THREADED_TEST(SemaphoreInterruption) { 18328 THREADED_TEST(SemaphoreInterruption) {
18327 ThreadInterruptTest().RunTest(); 18329 ThreadInterruptTest().RunTest();
18328 } 18330 }
18329 18331
18330 #endif // WIN32 18332 #endif // WIN32
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-strings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698