24 lines
546 B
Plaintext
24 lines
546 B
Plaintext
# @TEST-EXEC: HILTI_CXX_FLAGS="-DVALUE=1 -DVALUE2=2" ${HILTIC} -j %INPUT my-test.cc
|
|
#
|
|
# @TEST-DOC: Ensure hiltic honors the environment variable HILTI_CXX_FLAGS
|
|
|
|
module Test {
|
|
|
|
declare public int<64> test1() &cxxname="test1";
|
|
declare public int<64> test2() &cxxname="test2";
|
|
|
|
assert(test1() == 1);
|
|
assert(test2() == 2);
|
|
|
|
}
|
|
|
|
@TEST-START-FILE my-test.cc
|
|
|
|
#include <cstdint>
|
|
#include <hilti/rt/types/integer.h>
|
|
|
|
hilti::rt::integer::safe<int64_t> test1() { return VALUE; }
|
|
hilti::rt::integer::safe<int64_t> test2() { return VALUE2; }
|
|
|
|
@TEST-END-FILE
|