diff --git a/tests/misc/custom_machdep.c b/tests/misc/custom_machdep.c index 1152d590191677fbcd9ca7a88afa65f5d71aa6b3..632c92e190ede177c72f63e300974ec19afd94ec 100644 --- a/tests/misc/custom_machdep.c +++ b/tests/misc/custom_machdep.c @@ -1,5 +1,9 @@ /* run.config* - OPT: -machdep %{dep:@PTEST_DIR@/@PTEST_NAME@.yaml} -print + MACRO: machdep %{dep:@PTEST_DIR@/@PTEST_NAME@.yaml} + OPT: -machdep @machdep@ -print + COMMENT: we can't only use -D, as the __fc_machdep.h define takes precedence + COMMENT: with -U, our cmdline definition is used in the code + OPT: -machdep @machdep@ -cpp-extra-args="-UCUSTOM_MACHDEP -DCUSTOM_MACHDEP=42" -print */ // most of the following includes are not directly used, but they test if // the custom machdep has defined the necessary constants diff --git a/tests/misc/oracle/custom_machdep.res.oracle b/tests/misc/oracle/custom_machdep.0.res.oracle similarity index 100% rename from tests/misc/oracle/custom_machdep.res.oracle rename to tests/misc/oracle/custom_machdep.0.res.oracle diff --git a/tests/misc/oracle/custom_machdep.1.res.oracle b/tests/misc/oracle/custom_machdep.1.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..ed9c8ba51804051aed964269c7962aded88aa499 --- /dev/null +++ b/tests/misc/oracle/custom_machdep.1.res.oracle @@ -0,0 +1,25 @@ +[kernel] Parsing custom_machdep.c (with preprocessing) +/* Generated by Frama-C */ +#include "ctype.h" +#include "errno.h" +#include "inttypes.h" +#include "locale.h" +#include "math.h" +#include "signal.h" +#include "stdarg.h" +#include "stddef.h" +#include "stdint.h" +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include "strings.h" +#include "time.h" +#include "wchar.h" +int main(void) +{ + int __retres; + __retres = 8388607 - 42; + return __retres; +} + +