diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-05-04 00:16:53 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-05-04 00:17:27 +0530 |
commit | 0ac33b885727180b071fa091c34ef56d00b80ceb (patch) | |
tree | ed93235e512a2ebe702a30c8a16e17697a5a5c92 /test cases | |
parent | 2300c022c24d12f1bf2f41171dc97ea9b318a9ce (diff) | |
download | meson-0ac33b885727180b071fa091c34ef56d00b80ceb.zip meson-0ac33b885727180b071fa091c34ef56d00b80ceb.tar.gz meson-0ac33b885727180b071fa091c34ef56d00b80ceb.tar.bz2 |
tests/common/43: Better, more descriptive error messages
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/43 has function/meson.build | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test cases/common/43 has function/meson.build b/test cases/common/43 has function/meson.build index 3736a3d..c7fe353 100644 --- a/test cases/common/43 has function/meson.build +++ b/test cases/common/43 has function/meson.build @@ -3,16 +3,16 @@ project('has function', 'c') cc = meson.get_compiler('c') if not cc.has_function('printf', prefix : '#include<stdio.h>') - error('Existing function not found.') + error('"printf" function not found (should always exist).') endif # Should also be able to detect it without specifying the header # We check for a different function here to make sure the result is # not taken from a cache (ie. the check above) -assert(cc.has_function('fprintf'), 'Existing function not found without include') +assert(cc.has_function('fprintf'), '"fprintf" function not found without include (should always exist).') if cc.has_function('hfkerhisadf', prefix : '#include<stdio.h>') - error('Found non-existant function.') + error('Found non-existent function "hfkerhisadf".') endif # With glibc on Linux lchmod is a stub that will always return an error, @@ -21,9 +21,9 @@ endif # implemented in glibc it's probably not implemented in any other 'slimmer' # C library variants either, so the check should be safe either way hopefully. if host_machine.system() == 'linux' and cc.get_id() == 'gcc' - assert (cc.has_function('poll', prefix : '#include <poll.h>'), 'couldn\'t detect poll when defined by a header') + assert (cc.has_function('poll', prefix : '#include <poll.h>'), 'couldn\'t detect "poll" when defined by a header') assert (not cc.has_function('lchmod', prefix : '''#include <sys/stat.h> - #include <unistd.h>'''), 'lchmod check should have failed') + #include <unistd.h>'''), '"lchmod" check should have failed') endif # For some functions one needs to define _GNU_SOURCE before including the @@ -31,5 +31,5 @@ endif # as well without any prefix if cc.has_header_symbol('sys/socket.h', 'recvmmsg', prefix : '#define _GNU_SOURCE') # We assume that if recvmmsg exists sendmmsg does too - assert (cc.has_function('sendmmsg'), 'Failed to detect existing function') + assert (cc.has_function('sendmmsg'), 'Failed to detect function "sendmmsg" (should always exist).') endif |