Index: runtime/vm/compiler_test.cc |
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc |
index fcee41e6f55a58bb31abe0028b9bc60fcbdaa64d..08e2285d08e39e77bbf20cd04a7aedd67acea251 100644 |
--- a/runtime/vm/compiler_test.cc |
+++ b/runtime/vm/compiler_test.cc |
@@ -50,7 +50,8 @@ TEST_CASE(CompileFunction) { |
Function& function_foo = |
Function::Handle(cls.LookupStaticFunction(function_foo_name)); |
EXPECT(!function_foo.IsNull()); |
- |
+ String& function_source = String::Handle(function_foo.GetSource()); |
+ EXPECT_STREQ("static foo() { return 42; }\n ", function_source.ToCString()); |
EXPECT(CompilerTest::TestCompileFunction(function_foo)); |
EXPECT(function_foo.HasCode()); |
@@ -61,6 +62,9 @@ TEST_CASE(CompileFunction) { |
EXPECT(CompilerTest::TestCompileFunction(function_moo)); |
EXPECT(function_moo.HasCode()); |
+ function_source = function_moo.GetSource(); |
+ EXPECT_STREQ("static moo() {\n // A.foo();\n }\n", |
+ function_source.ToCString()); |
} |