dart-sdk/tests
Simon Binder be893fdf27 [vm/ffi] Add providesSymbol to DynamicLibrary
This adds the providesSymbol method to DynamicLibrary. It returns
whether the library contains a function with the given name.

As per dlsym(3), it is valid for dlsym to return nullptr in a success
case if the symbol actually has a NULL value. So I've changed the logic
to check for dlerror() after we invoke dlsym(), both in the existing
lookup and in the new method.

Closes https://github.com/dart-lang/sdk/issues/46192

TEST=tests/ffi(_2)/has_symbol_test.dart

Change-Id: Ibcb1c051cc0cdd95a104fe86ef2fc76da5bafb5d
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201900
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-06-02 16:01:43 +00:00
..
co19 [co19] Constructor Tear Offs tests skipped as not implemented 2021-05-19 08:19:47 +00:00
co19_2 [co19] co19_2 status file cleanup 2021-05-27 08:15:04 +00:00
corelib Correct symbol_reserved_word_test.dart, splitting it into two tests. 2021-06-01 15:55:03 +00:00
corelib_2 Fix test names in corelib/. 2021-05-05 01:06:12 +00:00
dartdevc [ddc] Add a regression test for issue #45874 2021-05-11 22:14:28 +00:00
dartdevc_2 [testing] Rely on language versions in the analyzer tests 2021-06-02 07:47:46 +00:00
ffi [vm/ffi] Add providesSymbol to DynamicLibrary 2021-06-02 16:01:43 +00:00
ffi_2 [vm/ffi] Add providesSymbol to DynamicLibrary 2021-06-02 16:01:43 +00:00
language Remove hack that builds FunctionExpressionInvocation with synthetic arguments. 2021-06-01 22:44:45 +00:00
language_2 [testing] Rely on language versions in the analyzer tests 2021-06-02 07:47:46 +00:00
lib Optimize js_util setProperty calls for non-function values to 2021-05-25 19:28:01 +00:00
lib_2 [testing] Rely on language versions in the analyzer tests 2021-06-02 07:47:46 +00:00
modular [ddc] Fix private class exposed by typedef 2021-04-05 18:54:56 +00:00
standalone Fix abstract unix socket test 2021-06-01 17:30:54 +00:00
standalone_2 [testing] Fix line numbers in dwarf_stack_trace_test.dart 2021-06-02 09:54:25 +00:00
web [dart2js] Pass box to inlined generative constructor body 2021-05-07 22:50:27 +00:00
web_2 [testing] Rely on language versions in the analyzer tests 2021-06-02 07:47:46 +00:00
legacy_status_dart2js.csv
README.md

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.