| Index: runtime/vm/native_symbol_test.cc
|
| diff --git a/runtime/vm/native_symbol_test.cc b/runtime/vm/native_symbol_test.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..aa0754d09704b52cd7732e74c9eb0db64ce10968
|
| --- /dev/null
|
| +++ b/runtime/vm/native_symbol_test.cc
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +#include "platform/assert.h"
|
| +
|
| +#include "vm/dart_api_impl.h"
|
| +#include "vm/dart_api_state.h"
|
| +#include "vm/globals.h"
|
| +#include "vm/profiler.h"
|
| +#include "vm/native_symbol.h"
|
| +#include "vm/unit_test.h"
|
| +
|
| +extern int main(int argc, const char** argv);
|
| +
|
| +namespace dart {
|
| +
|
| +
|
| +TEST_CASE(LookupNativeSymbol) {
|
| + uintptr_t p = reinterpret_cast<uintptr_t>(&main);
|
| + const char* name = NativeSymbolResolver::LookupSymbolName(p);
|
| + EXPECT_NOTNULL(name);
|
| + EXPECT_SUBSTRING("main", name);
|
| + NativeSymbolResolver::FreeSymbolName(name);
|
| +}
|
| +
|
| +
|
| +} // namespace dart
|
|
|