diff options
author | Patrik Nyblom <[email protected]> | 2010-05-07 09:33:56 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-05-17 15:51:50 +0200 |
commit | dce00e268eb36048a729db9a2a9aebd4df0e7395 (patch) | |
tree | 311483aa50e80144fa219bf439aa15a5a88921ec /erts | |
parent | ababeff98d7def30898786629cc5a16ea3949a24 (diff) | |
download | otp-dce00e268eb36048a729db9a2a9aebd4df0e7395.tar.gz otp-dce00e268eb36048a729db9a2a9aebd4df0e7395.tar.bz2 otp-dce00e268eb36048a729db9a2a9aebd4df0e7395.zip |
Add more tests and make some go easier on small systems
Even more tests added to cover more error cases, some tests
made easier on systems with small memories and timeouts made longer
due to timetraps on solaris daily builds.
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_bif_binary.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c index cba17ee6eb..0a40e28474 100644 --- a/erts/emulator/beam/erl_bif_binary.c +++ b/erts/emulator/beam/erl_bif_binary.c @@ -1365,16 +1365,12 @@ static BIF_RETTYPE binary_match_trap(BIF_ALIST_3) Eterm result; Binary *bin = ((ProcBin *) binary_val(BIF_ARG_3))->val; runres = do_binary_match(BIF_P,BIF_ARG_1,0,0,NIL,bin,BIF_ARG_2,&result); - switch (runres) { - case DO_BIN_MATCH_OK: + if (runres == DO_BIN_MATCH_OK) { BIF_RET(result); - case DO_BIN_MATCH_RESTART: + } else { BUMP_ALL_REDS(BIF_P); BIF_TRAP3(&binary_match_trap_export, BIF_P, BIF_ARG_1, result, BIF_ARG_3); - default: - /* Cannot badarg in the trap */ - erl_exit(1, "Internal error in binary_match_trap."); } } @@ -1384,20 +1380,15 @@ static BIF_RETTYPE binary_matches_trap(BIF_ALIST_3) Eterm result; Binary *bin = ((ProcBin *) binary_val(BIF_ARG_3))->val; runres = do_binary_matches(BIF_P,BIF_ARG_1,0,0,NIL,bin,BIF_ARG_2,&result); - switch (runres) { - case DO_BIN_MATCH_OK: + if (runres == DO_BIN_MATCH_OK) { BIF_RET(result); - case DO_BIN_MATCH_RESTART: + } else { BUMP_ALL_REDS(BIF_P); BIF_TRAP3(&binary_matches_trap_export, BIF_P, BIF_ARG_1, result, BIF_ARG_3); - default: - /* Cannot badarg in the trap */ - erl_exit(1, "Internal error in binary_matches_trap."); } } - BIF_RETTYPE binary_match_3(BIF_ALIST_3) { Uint hsstart; |