aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorMichael Hirsch, Ph.D <scivision@users.noreply.github.com>2019-11-13 16:05:00 -0500
committerMichael Hirsch, Ph.D <scivision@users.noreply.github.com>2020-02-05 13:23:55 -0500
commit554d35c3f3eb8710d1a265dccd173cbf653258bf (patch)
tree3fcedb2bf48c32aecb2360e3b1e1980839199f79 /test cases
parent6c963726cf7b9781fed55fd4ba41f81bca2d4dbb (diff)
downloadmeson-554d35c3f3eb8710d1a265dccd173cbf653258bf.zip
meson-554d35c3f3eb8710d1a265dccd173cbf653258bf.tar.gz
meson-554d35c3f3eb8710d1a265dccd173cbf653258bf.tar.bz2
add get_external_property to replace get_cross_property
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/192 args flattening/meson.build10
-rw-r--r--test cases/common/228 native prop/meson.build10
-rw-r--r--test cases/common/229 native prop/meson.build24
-rw-r--r--test cases/common/229 native prop/nativefile.ini (renamed from test cases/common/228 native prop/nativefile.ini)0
-rw-r--r--test cases/failing/97 no native prop/meson.build3
-rw-r--r--test cases/failing/99 no native prop/meson.build3
6 files changed, 35 insertions, 15 deletions
diff --git a/test cases/common/192 args flattening/meson.build b/test cases/common/192 args flattening/meson.build
index 42eb6d5..1dac2f9 100644
--- a/test cases/common/192 args flattening/meson.build
+++ b/test cases/common/192 args flattening/meson.build
@@ -16,8 +16,14 @@ assert(arr == ['bar', 'baz'], 'configuration_data.get with array fallback is bro
arr = meson.get_cross_property('does-not-exist', ['bar', 'baz'])
assert(arr == ['bar', 'baz'], 'meson.get_cross_property with array fallback is broken')
-arr = meson.get_native_property('does-not-exist', ['bar', 'baz'])
-assert(arr == ['bar', 'baz'], 'meson.get_native_property with array fallback is broken')
+arr = meson.get_external_property('does-not-exist', ['bar', 'baz'])
+assert(arr == ['bar', 'baz'], 'meson.get_external_property with array fallback is broken')
+
+arr = meson.get_external_property('does-not-exist', ['bar', 'baz'], native: true)
+assert(arr == ['bar', 'baz'], 'meson.get_external_property native:true with array fallback is broken')
+
+arr = meson.get_external_property('does-not-exist', ['bar', 'baz'], native: false)
+assert(arr == ['bar', 'baz'], 'meson.get_external_property native:false with array fallback is broken')
# Test deprecated behaviour
diff --git a/test cases/common/228 native prop/meson.build b/test cases/common/228 native prop/meson.build
deleted file mode 100644
index 5cffcad..0000000
--- a/test cases/common/228 native prop/meson.build
+++ /dev/null
@@ -1,10 +0,0 @@
-project('get native prop')
-
-x = meson.get_native_property('astring')
-assert(x=='mystring', 'did not get native property string. did you use "meson setup --native-file native.txt"')
-
-x = meson.get_native_property('notexist', 'fallback')
-assert(x=='fallback', 'fallback did not work')
-
-x = meson.get_native_property('anarray')
-assert(x==['one', 'two'], 'array did not work') \ No newline at end of file
diff --git a/test cases/common/229 native prop/meson.build b/test cases/common/229 native prop/meson.build
new file mode 100644
index 0000000..f752bcc
--- /dev/null
+++ b/test cases/common/229 native prop/meson.build
@@ -0,0 +1,24 @@
+project('get prop')
+
+x = meson.get_external_property('astring')
+assert(x=='mystring', 'did not get native property string. did you use "meson setup --native-file native.txt"')
+
+x = meson.get_external_property('astring', native: true)
+assert(x=='mystring', 'did not get native property with native:true and non-cross build.')
+
+x = meson.get_external_property('astring', 'fallback', native: false)
+assert(x=='mystring', 'did not get get native property with native:false and non-cross build.')
+
+
+x = meson.get_external_property('notexist', 'fallback')
+assert(x=='fallback', 'fallback did not work')
+
+x = meson.get_external_property('notexist', 'fallback', native: true)
+assert(x=='fallback', 'fallback native:true did not work')
+
+x = meson.get_external_property('notexist', 'fallback', native: false)
+assert(x=='fallback', 'fallback native:false did not work')
+
+
+x = meson.get_external_property('anarray')
+assert(x==['one', 'two'], 'array did not work') \ No newline at end of file
diff --git a/test cases/common/228 native prop/nativefile.ini b/test cases/common/229 native prop/nativefile.ini
index 03c1e03..03c1e03 100644
--- a/test cases/common/228 native prop/nativefile.ini
+++ b/test cases/common/229 native prop/nativefile.ini
diff --git a/test cases/failing/97 no native prop/meson.build b/test cases/failing/97 no native prop/meson.build
deleted file mode 100644
index 2b7b46e..0000000
--- a/test cases/failing/97 no native prop/meson.build
+++ /dev/null
@@ -1,3 +0,0 @@
-project('missing native property')
-
-message(meson.get_native_property('nonexisting'))
diff --git a/test cases/failing/99 no native prop/meson.build b/test cases/failing/99 no native prop/meson.build
new file mode 100644
index 0000000..c956754
--- /dev/null
+++ b/test cases/failing/99 no native prop/meson.build
@@ -0,0 +1,3 @@
+project('missing property')
+
+message(meson.get_external_property('nonexisting'))