mirror of
https://github.com/open-goal/jak-project
synced 2026-08-14 20:43:54 -04:00
add get-enum-vals (#737)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
(defenum test-val-enum
|
||||
(thing1 1)
|
||||
(thing3 3)
|
||||
(thing5 5)
|
||||
)
|
||||
|
||||
(defmacro test-enum-vals ()
|
||||
(let ((enum-list (get-enum-vals 'test-val-enum)))
|
||||
`(quote ,enum-list)
|
||||
)
|
||||
)
|
||||
|
||||
(printl (test-enum-vals))
|
||||
0
|
||||
@@ -824,6 +824,12 @@ TEST_F(WithGameTests, StackInlineArray) {
|
||||
"#x30\n0\n"});
|
||||
}
|
||||
|
||||
TEST_F(WithGameTests, GetEnumVals) {
|
||||
runner.run_static_test(env, testCategory, "test-get-enum-vals.gc",
|
||||
{"((thing1 . #<invalid object #x1>) (thing3 . #<invalid object #x3>) "
|
||||
"(thing5 . #<invalid object #x5>))\n0\n"});
|
||||
}
|
||||
|
||||
TEST(TypeConsistency, TypeConsistency) {
|
||||
Compiler compiler;
|
||||
compiler.enable_throw_on_redefines();
|
||||
|
||||
Reference in New Issue
Block a user