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

Unified Diff: runtime/vm/unit_test.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/unit_test.h ('k') | runtime/vm/uri.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.cc
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 4c25bc823dc2b9f1f2568b9651b7a2f4bd8e531e..ebf5fb2e197ec420a65fa00465433d711d7be603 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -33,7 +33,6 @@ DECLARE_FLAG(bool, use_dart_frontend);
TestCaseBase* TestCaseBase::first_ = NULL;
TestCaseBase* TestCaseBase::tail_ = NULL;
-
TestCaseBase::TestCaseBase(const char* name)
: raw_test_(false), next_(NULL), name_(name) {
if (first_ == NULL) {
@@ -44,7 +43,6 @@ TestCaseBase::TestCaseBase(const char* name)
tail_ = this;
}
-
void TestCaseBase::RunAllRaw() {
TestCaseBase* test = first_;
while (test != NULL) {
@@ -55,7 +53,6 @@ void TestCaseBase::RunAllRaw() {
}
}
-
void TestCaseBase::RunAll() {
TestCaseBase* test = first_;
while (test != NULL) {
@@ -66,7 +63,6 @@ void TestCaseBase::RunAll() {
}
}
-
Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer, const char* name) {
char* err;
Dart_Isolate isolate =
@@ -79,25 +75,20 @@ Dart_Isolate TestCase::CreateIsolate(const uint8_t* buffer, const char* name) {
return isolate;
}
-
static const char* kPackageScheme = "package:";
-
static bool IsPackageSchemeURL(const char* url_name) {
static const intptr_t kPackageSchemeLen = strlen(kPackageScheme);
return (strncmp(url_name, kPackageScheme, kPackageSchemeLen) == 0);
}
-
struct TestLibEntry {
const char* url;
const char* source;
};
-
static MallocGrowableArray<TestLibEntry>* test_libs_ = NULL;
-
void TestCase::AddTestLib(const char* url, const char* source) {
if (test_libs_ == NULL) {
test_libs_ = new MallocGrowableArray<TestLibEntry>();
@@ -115,7 +106,6 @@ void TestCase::AddTestLib(const char* url, const char* source) {
test_libs_->Add(entry);
}
-
const char* TestCase::GetTestLib(const char* url) {
if (test_libs_ == NULL) {
return NULL;
@@ -137,18 +127,15 @@ static bool IsIsolateReloadTestLib(const char* url_name) {
kIsolateReloadTestLibUriLen) == 0);
}
-
static Dart_Handle IsolateReloadTestLibSource() {
// Special library with one function.
return DartUtils::NewString("void reloadTest() native 'Reload_Test';\n");
}
-
static void ReloadTest(Dart_NativeArguments native_args) {
DART_CHECK_VALID(TestCase::TriggerReload());
}
-
static Dart_NativeFunction IsolateReloadTestNativeResolver(
Dart_Handle name,
int num_of_arguments,
@@ -157,7 +144,6 @@ static Dart_NativeFunction IsolateReloadTestNativeResolver(
}
#endif // !PRODUCT
-
static Dart_Handle ResolvePackageUri(const char* uri_chars) {
const int kNumArgs = 1;
Dart_Handle dart_args[kNumArgs];
@@ -167,7 +153,6 @@ static Dart_Handle ResolvePackageUri(const char* uri_chars) {
dart_args);
}
-
static ThreadLocalKey script_reload_key = kUnsetThreadLocalKey;
static char* CompileTestScriptWithDFE(const char* url,
@@ -369,7 +354,6 @@ Dart_Handle TestCase::LoadTestScript(const char* script,
#ifndef PRODUCT
-
void TestCase::SetReloadTestScript(const char* script) {
if (script_reload_key == kUnsetThreadLocalKey) {
script_reload_key = OSThread::CreateThreadLocal();
@@ -380,7 +364,6 @@ void TestCase::SetReloadTestScript(const char* script) {
OSThread::SetThreadLocal(script_reload_key, reinterpret_cast<uword>(script));
}
-
Dart_Handle TestCase::TriggerReload() {
Isolate* isolate = Isolate::Current();
JSONStream js;
@@ -401,7 +384,6 @@ Dart_Handle TestCase::TriggerReload() {
}
}
-
Dart_Handle TestCase::GetReloadErrorOrRootLibrary() {
Isolate* isolate = Isolate::Current();
@@ -414,7 +396,6 @@ Dart_Handle TestCase::GetReloadErrorOrRootLibrary() {
return Dart_RootLibrary();
}
-
Dart_Handle TestCase::ReloadTestScript(const char* script) {
SetReloadTestScript(script);
@@ -437,16 +418,13 @@ Dart_Handle TestCase::ReloadTestScript(const char* script) {
return result;
}
-
#endif // !PRODUCT
-
Dart_Handle TestCase::LoadCoreTestScript(const char* script,
Dart_NativeEntryResolver resolver) {
return LoadTestScript(script, resolver, CORELIB_TEST_URI);
}
-
Dart_Handle TestCase::lib() {
Dart_Handle url = NewString(TestCase::url());
Dart_Handle lib = Dart_LookupLibrary(url);
@@ -455,7 +433,6 @@ Dart_Handle TestCase::lib() {
return lib;
}
-
Dart_Handle TestCase::library_handler(Dart_LibraryTag tag,
Dart_Handle library,
Dart_Handle url) {
@@ -465,12 +442,10 @@ Dart_Handle TestCase::library_handler(Dart_LibraryTag tag,
return Api::Success();
}
-
char* TestCase::BigintToHexValue(Dart_CObject* bigint) {
return bin::CObject::BigintToHexValue(bigint);
}
-
void AssemblerTest::Assemble() {
const String& function_name =
String::ZoneHandle(Symbols::New(Thread::Current(), name_));
@@ -503,7 +478,6 @@ void AssemblerTest::Assemble() {
#endif // !PRODUCT
}
-
CodeGenTest::CodeGenTest(const char* name)
: function_(Function::ZoneHandle()),
node_sequence_(new SequenceNode(TokenPosition::kMinSource,
@@ -527,7 +501,6 @@ CodeGenTest::CodeGenTest(const char* name)
lib.AddClass(cls);
}
-
void CodeGenTest::Compile() {
if (function_.HasCode()) return;
ParsedFunction* parsed_function =
@@ -543,7 +516,6 @@ void CodeGenTest::Compile() {
EXPECT(error.IsNull());
}
-
bool CompilerTest::TestCompileScript(const Library& library,
const Script& script) {
Isolate* isolate = Isolate::Current();
@@ -555,7 +527,6 @@ bool CompilerTest::TestCompileScript(const Library& library,
return error.IsNull();
}
-
bool CompilerTest::TestCompileFunction(const Function& function) {
Thread* thread = Thread::Current();
ASSERT(thread != NULL);
@@ -565,7 +536,6 @@ bool CompilerTest::TestCompileFunction(const Function& function) {
return result.IsCode();
}
-
void ElideJSONSubstring(const char* prefix, const char* in, char* out) {
const char* pos = strstr(in, prefix);
while (pos != NULL) {
@@ -585,5 +555,4 @@ void ElideJSONSubstring(const char* prefix, const char* in, char* out) {
*out = '\0';
}
-
} // namespace dart
« no previous file with comments | « runtime/vm/unit_test.h ('k') | runtime/vm/uri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698