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

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

Issue 351373002: Coverage API revamp (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
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 // TODO(zra): Remove when tests are ready to enable. 5 // TODO(zra): Remove when tests are ready to enable.
6 #include "platform/globals.h" 6 #include "platform/globals.h"
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 Dart_Handle h_lib = TestCase::LoadTestScript(kScript, NULL); 2218 Dart_Handle h_lib = TestCase::LoadTestScript(kScript, NULL);
2219 EXPECT_VALID(h_lib); 2219 EXPECT_VALID(h_lib);
2220 Library& lib = Library::Handle(); 2220 Library& lib = Library::Handle();
2221 lib ^= Api::UnwrapHandle(h_lib); 2221 lib ^= Api::UnwrapHandle(h_lib);
2222 EXPECT(!lib.IsNull()); 2222 EXPECT(!lib.IsNull());
2223 Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL); 2223 Dart_Handle result = Dart_Invoke(h_lib, NewString("main"), 0, NULL);
2224 EXPECT_VALID(result); 2224 EXPECT_VALID(result);
2225 Script& script2 = Script::Handle( 2225 Script& script2 = Script::Handle(
2226 Script::FindByUrl(String::Handle(String::New("test-lib")))); 2226 Script::FindByUrl(String::Handle(String::New("test-lib"))));
2227 EXPECT(!script2.IsNull()); 2227 EXPECT(!script2.IsNull());
2228 const Library& lib2 = Library::Handle(script2.FindLibrary());
2229 EXPECT_EQ(lib2.raw(), lib.raw());
2230 script2 = Script::FindByUrl(String::Handle(String::New("non-there.dart"))); 2228 script2 = Script::FindByUrl(String::Handle(String::New("non-there.dart")));
2231 EXPECT(script2.IsNull()); 2229 EXPECT(script2.IsNull());
2232 } 2230 }
2233 2231
2234 2232
2235 TEST_CASE(EmbeddedScript) { 2233 TEST_CASE(EmbeddedScript) {
2236 const char* url_chars = "builtin:test-case"; 2234 const char* url_chars = "builtin:test-case";
2237 const char* text = 2235 const char* text =
2238 /* 1 */ "<!DOCTYPE html>\n" 2236 /* 1 */ "<!DOCTYPE html>\n"
2239 /* 2 */ " ... more junk ...\n" 2237 /* 2 */ " ... more junk ...\n"
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 const Instance& a0 = Instance::Handle(Instance::New(clazz)); 4082 const Instance& a0 = Instance::Handle(Instance::New(clazz));
4085 const Instance& a1 = Instance::Handle(Instance::New(clazz)); 4083 const Instance& a1 = Instance::Handle(Instance::New(clazz));
4086 EXPECT(a0.raw() != a1.raw()); 4084 EXPECT(a0.raw() != a1.raw());
4087 EXPECT(a0.OperatorEquals(a0)); 4085 EXPECT(a0.OperatorEquals(a0));
4088 EXPECT(a0.OperatorEquals(a1)); 4086 EXPECT(a0.OperatorEquals(a1));
4089 EXPECT(a0.IsIdenticalTo(a0)); 4087 EXPECT(a0.IsIdenticalTo(a0));
4090 EXPECT(!a0.IsIdenticalTo(a1)); 4088 EXPECT(!a0.IsIdenticalTo(a1));
4091 } 4089 }
4092 4090
4093 } // namespace dart 4091 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698