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

Side by Side Diff: runtime/vm/snapshot_test.cc

Issue 14791005: BREAKING CHANGE: enforce part of directive (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « runtime/vm/parser_test.cc ('k') | tests/language/empty_main.dart » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_message.h" 10 #include "vm/dart_api_message.h"
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 " static s1() { return 'this is a string in the source'; }\n" 808 " static s1() { return 'this is a string in the source'; }\n"
809 " static s2() { return 'this is a \"string\" in the source'; }\n" 809 " static s2() { return 'this is a \"string\" in the source'; }\n"
810 " static s3() { return 'this is a \\\'string\\\' in \"the\" source'; }\n" 810 " static s3() { return 'this is a \\\'string\\\' in \"the\" source'; }\n"
811 " static s4() { return 'this \"is\" a \"string\" in \"the\" source'; }\n" 811 " static s4() { return 'this \"is\" a \"string\" in \"the\" source'; }\n"
812 "}\n"; 812 "}\n";
813 813
814 String& url = String::Handle(String::New("dart-test:SerializeScript")); 814 String& url = String::Handle(String::New("dart-test:SerializeScript"));
815 String& source = String::Handle(String::New(kScriptChars)); 815 String& source = String::Handle(String::New(kScriptChars));
816 Script& script = Script::Handle(Script::New(url, 816 Script& script = Script::Handle(Script::New(url,
817 source, 817 source,
818 RawScript::kSourceTag)); 818 RawScript::kScriptTag));
819 const String& lib_url = String::Handle(Symbols::New("TestLib")); 819 const String& lib_url = String::Handle(Symbols::New("TestLib"));
820 Library& lib = Library::Handle(Library::New(lib_url)); 820 Library& lib = Library::Handle(Library::New(lib_url));
821 lib.Register(); 821 lib.Register();
822 EXPECT(CompilerTest::TestCompileScript(lib, script)); 822 EXPECT(CompilerTest::TestCompileScript(lib, script));
823 823
824 // Write snapshot with script content. 824 // Write snapshot with script content.
825 uint8_t* buffer; 825 uint8_t* buffer;
826 TestSnapshotWriter writer(&buffer, &malloc_allocator); 826 TestSnapshotWriter writer(&buffer, &malloc_allocator);
827 writer.WriteScript(script); 827 writer.WriteScript(script);
828 828
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 result = Dart_RunLoop(); 2486 result = Dart_RunLoop();
2487 EXPECT(Dart_IsError(result)); 2487 EXPECT(Dart_IsError(result));
2488 EXPECT(Dart_ErrorHasException(result)); 2488 EXPECT(Dart_ErrorHasException(result));
2489 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", 2489 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n",
2490 Dart_GetError(result)); 2490 Dart_GetError(result));
2491 2491
2492 Dart_ExitScope(); 2492 Dart_ExitScope();
2493 } 2493 }
2494 2494
2495 } // namespace dart 2495 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser_test.cc ('k') | tests/language/empty_main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698