Skip to content

Commit

Permalink
Add a test for bug 1618
Browse files Browse the repository at this point in the history
Tests: No
Bugs: android/ndk#1618
Change-Id: I211593312ae6858a30a401a10681230cafb3214d
(cherry picked from commit 6bd8bfd9c3b5dbdbdfa1be5eb25f614c0d724b05)
Merged-In: I211593312ae6858a30a401a10681230cafb3214d
  • Loading branch information
ZijunZhaoCCK authored and Android Build Coastguard Worker committed Apr 22, 2022
1 parent 4a7739f commit fcb3751
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/build/cmake-ANDROID_EXCEPTIONS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmake_minimum_required(VERSION 3.6.0)
add_executable(foo foo.cpp)
8 changes: 8 additions & 0 deletions tests/build/cmake-ANDROID_EXCEPTIONS/foo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main(int argc, char** argv) {
try {
throw 42;
} catch (const int& ex) {
return ex;
}
return 0;
}
5 changes: 5 additions & 0 deletions tests/build/cmake-ANDROID_EXCEPTIONS/test_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def extra_cmake_flags():
return ['-DANDROID_CPP_FEATURES=no-exceptions']

def is_negative_test():
return True

0 comments on commit fcb3751

Please sign in to comment.