summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>2015-05-21 19:10:01 +0300
committerIgor Gnatenko <i.gnatenko.brain@gmail.com>2015-05-21 19:10:01 +0300
commit46804d4fe6985da8ea1de99792c506a24e469489 (patch)
treeffca7e87aecf1dd49bd1346f9621099083f6e786 /test cases
parent0ba1d545afe021e09090f434d5242ae942e7d5b4 (diff)
downloadmeson-46804d4fe6985da8ea1de99792c506a24e469489.tar.gz
add has_type method
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/83 has type/meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/test cases/common/83 has type/meson.build b/test cases/common/83 has type/meson.build
new file mode 100644
index 000000000..002f1505a
--- /dev/null
+++ b/test cases/common/83 has type/meson.build
@@ -0,0 +1,11 @@
+project('has type', 'c')
+
+cc = meson.get_compiler('c')
+
+if not cc.has_type('time_t', prefix : '#include<time.h>')
+ error('Did not detect type that exists.')
+endif
+
+if cc.has_type('no_time_t', prefix : '#include<time.h>')
+ error('Not existing type found.')
+endif