aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-11-21 11:40:15 +0000
committergingerBill <bill@gingerbill.org>2020-11-21 11:40:15 +0000
commitfa50c8d7d3dc83642d10df255deabc73b75a17cf (patch)
treea59f116d21be79486096f046ffa6893114b1d9f6 /src/checker.cpp
parent260e28c0af2130a78862a5e253b98178fb480f02 (diff)
Add `ODIN_TEST` constant for checking if `odin test` is being run
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 3339b6bfc..0559fd300 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -744,6 +744,7 @@ void init_universal(void) {
add_global_constant(str_lit("ODIN_DEFAULT_TO_NIL_ALLOCATOR"), t_untyped_bool, exact_value_bool(bc->ODIN_DEFAULT_TO_NIL_ALLOCATOR));
add_global_constant(str_lit("ODIN_USE_LLVM_API"), t_untyped_bool, exact_value_bool(bc->use_llvm_api));
add_global_constant(str_lit("ODIN_NO_DYNAMIC_LITERALS"), t_untyped_bool, exact_value_bool(bc->no_dynamic_literals));
+ add_global_constant(str_lit("ODIN_TEST"), t_untyped_bool, exact_value_bool(bc->command_kind == Command_test));
// Builtin Procedures