Index: runtime/vm/dart_api_impl_test.cc |
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc |
index 2247055bee6a3ad1aaa8047ce8df1582e48df3ef..9ffc1d6442b0a87878f836ebc72777e1da7a07b1 100644 |
--- a/runtime/vm/dart_api_impl_test.cc |
+++ b/runtime/vm/dart_api_impl_test.cc |
@@ -5151,6 +5151,32 @@ TEST_CASE(Invoke) { |
} |
+TEST_CASE(Invoke_PrivateStatic) { |
+ const char* kScriptChars = |
+ "class Methods {\n" |
+ " static _staticMethod(arg) => 'hidden static $arg';\n" |
+ "}\n" |
+ "\n"; |
+ |
+ // Shared setup. |
+ Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL); |
+ Dart_Handle type = Dart_GetType(lib, NewString("Methods"), 0, NULL); |
+ Dart_Handle result; |
+ EXPECT_VALID(type); |
+ Dart_Handle name = NewString("_staticMethod"); |
+ EXPECT_VALID(name); |
+ |
+ Dart_Handle args[1]; |
+ args[0] = NewString("!!!"); |
+ result = Dart_Invoke(type, name, 1, args); |
+ EXPECT_VALID(result); |
+ |
+ const char* str = NULL; |
+ result = Dart_StringToCString(result, &str); |
+ EXPECT_STREQ("hidden static !!!", str); |
+} |
+ |
+ |
TEST_CASE(Invoke_FunnyArgs) { |
const char* kScriptChars = |
"test(arg) => 'hello $arg';\n"; |