OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #include "platform/assert.h" |
| 6 |
| 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/dart_api_state.h" |
| 9 #include "vm/globals.h" |
| 10 #include "vm/profiler.h" |
| 11 #include "vm/native_symbol.h" |
| 12 #include "vm/unit_test.h" |
| 13 |
| 14 extern int main(int argc, const char** argv); |
| 15 |
| 16 namespace dart { |
| 17 |
| 18 |
| 19 TEST_CASE(LookupNativeSymbol) { |
| 20 uintptr_t p = reinterpret_cast<uintptr_t>(&main); |
| 21 char* name = NativeSymbolResolver::LookupSymbolName(p); |
| 22 EXPECT_NOTNULL(name); |
| 23 EXPECT_SUBSTRING("main", name); |
| 24 NativeSymbolResolver::FreeSymbolName(name); |
| 25 } |
| 26 |
| 27 |
| 28 } // namespace dart |
OLD | NEW |