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

Side by Side Diff: test/cctest/cctest.h

Issue 1518703002: Re-re-land FastAccessorBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add test restrictions, as for test-api-fast-accessor-builder Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/fast-accessor-assembler.cc ('k') | test/cctest/cctest.gyp » ('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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 CHECK(result->SameValue(expected)); 543 CHECK(result->SameValue(expected));
544 } 544 }
545 545
546 546
547 static inline void ExpectUndefined(const char* code) { 547 static inline void ExpectUndefined(const char* code) {
548 v8::Local<v8::Value> result = CompileRun(code); 548 v8::Local<v8::Value> result = CompileRun(code);
549 CHECK(result->IsUndefined()); 549 CHECK(result->IsUndefined());
550 } 550 }
551 551
552 552
553 static inline void ExpectNull(const char* code) {
554 v8::Local<v8::Value> result = CompileRun(code);
555 CHECK(result->IsNull());
556 }
557
558
553 static inline void CheckDoubleEquals(double expected, double actual) { 559 static inline void CheckDoubleEquals(double expected, double actual) {
554 const double kEpsilon = 1e-10; 560 const double kEpsilon = 1e-10;
555 CHECK_LE(expected, actual + kEpsilon); 561 CHECK_LE(expected, actual + kEpsilon);
556 CHECK_GE(expected, actual - kEpsilon); 562 CHECK_GE(expected, actual - kEpsilon);
557 } 563 }
558 564
559 565
560 static void DummyDebugEventListener( 566 static void DummyDebugEventListener(
561 const v8::Debug::EventDetails& event_details) {} 567 const v8::Debug::EventDetails& event_details) {}
562 568
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 HandleAndZoneScope() {} 604 HandleAndZoneScope() {}
599 605
600 // Prefixing the below with main_ reduces a lot of naming clashes. 606 // Prefixing the below with main_ reduces a lot of naming clashes.
601 i::Zone* main_zone() { return &main_zone_; } 607 i::Zone* main_zone() { return &main_zone_; }
602 608
603 private: 609 private:
604 i::Zone main_zone_; 610 i::Zone main_zone_;
605 }; 611 };
606 612
607 #endif // ifndef CCTEST_H_ 613 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « src/compiler/fast-accessor-assembler.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698