Skip to content

Commit 2813ce9

Browse files
committed
tests: make test_raw_raise pass with AVM_CREATE_STACKTRACES=off
When using AVM_CREATE_STACKTRACES=off undefined is used as stacktrace value, making `test_raw_raise` fail. Since it is a known behavior also accept it, but this behavior should be checked and reviewed (e.g. `[]` might be used instead as stack trace value). See also atomvm#1247 Signed-off-by: Davide Bettio <[email protected]>
1 parent 2753129 commit 2813ce9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/erlang_tests/test_raw_raise.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ do_catch() ->
3030
_X -> 1
3131
catch
3232
error:{badarith, new_reason}:ST ->
33+
% TODO: verify if undefined is an acceptable value or an AtomVM only extension
34+
% See also issue #1247
3335
case ST of
3436
L when is_list(L) -> 0;
37+
undefined -> 0;
3538
_ -> 2
3639
end;
3740
_:_ ->

0 commit comments

Comments
 (0)