summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-06-25 21:14:27 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2021-06-26 12:49:35 +0200
commit8f7343831bb78e6801c93cd45e4edfeed65bc437 (patch)
treee90a37ac9b27584b8c43a32779330705973def02 /test cases
parentb95d6e319f18389c3a11408481335955bdff4e36 (diff)
downloadmeson-8f7343831bb78e6801c93cd45e4edfeed65bc437.tar.gz
refactor: Refactor BothLibraries logic
This commit introduces a new type of `HoldableObject`: The `SecondLevelHolder`. The primary purpose of this class is to handle cases where two (or more) `HoldableObject`s are stored at the same time (with one default object). The best (and currently only) example here is the `BothLibraries` class.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/178 bothlibraries/meson.build8
1 files changed, 8 insertions, 0 deletions
diff --git a/test cases/common/178 bothlibraries/meson.build b/test cases/common/178 bothlibraries/meson.build
index 9df4cd11c..f3191cc5d 100644
--- a/test cases/common/178 bothlibraries/meson.build
+++ b/test cases/common/178 bothlibraries/meson.build
@@ -34,8 +34,16 @@ exe_static2 = executable('prog-static2', 'main.c',
link_with : both_libs2.get_static_lib())
exe_both2 = executable('prog-both2', 'main.c', link_with : both_libs2)
+# Test {set,get}_variable
+set_variable('both_libs2', both_libs)
+both_libs3 = get_variable('both_libs')
+
# Ensure that calling the build target methods also works
assert(both_libs.name() == 'mylib')
+assert(both_libs2.name() == 'mylib')
+assert(both_libs3.name() == 'mylib')
+assert(both_libs2.get_shared_lib().name() == 'mylib')
+assert(both_libs3.get_static_lib().name() == 'mylib')
test('runtest-shared-2', exe_shared2)
test('runtest-static-2', exe_static2)