=== source code for shell_SUITE:bs_match_misc_SUITE/1

=== Test case started with:
shell_SUITE:bs_match_misc_SUITE([{watchdog,<0.7576.6>},
                                 {tc_logfile,
                                     "/home/pi/R16B03/otp-support/release/tests/test_server/ct_run.test_server@localhost.2014-01-03_17.38.00/tests.stdlib_test.logs/run.2014-01-03_17.51.25/shell_suite.bs_match_misc_suite.html"},
                                 {tc_group_properties,[{name,bits}]},
                                 {tc_group_path,[]},
                                 {data_dir,
                                     "/home/pi/R16B03/otp-support/release/tests/stdlib_test/shell_SUITE_data/"},
                                 {priv_dir,
                                     "/home/pi/R16B03/otp-support/release/tests/test_server/ct_run.test_server@localhost.2014-01-03_17.38.00/tests.stdlib_test.logs/run.2014-01-03_17.51.25/log_private/"},
                                 {nodenames,[]}])

=== Current directory is "/home/pi/R16B03/otp-support/release/tests/test_server/ct_run.test_server@localhost.2014-01-03_17.38.00"

=== Started at 2014-01-03 20:20:04


*** Testing F1 = fun() -> 3.1415 end, FOne = fun() -> 1.0 end, Fcmp = fun(F1, F2) when (F1 - F2) / F2 < 0.0000001 -> ok end, MakeSubBin = fun(Bin0) -> Sz = size(Bin0), Bin1 = <<37,Bin0/binary,38,39>>, <<_:8,Bin:Sz/binary,_:8,_:8>> = Bin1, Bin end, MatchFloat = fun(Bin0, Fsz, I) -> Bin = MakeSubBin(Bin0), Bsz = size(Bin) * 8, Tsz = Bsz - Fsz - I, <<_:I,F:Fsz/float,_:Tsz>> = Bin, F end, TFloat = fun() -> F = F1(), G = FOne(), G = MatchFloat(<<63,128,0,0>>, 32, 0), G = MatchFloat(<<63,240,0,0,0,0,0,0>>, 64, 0), Fcmp(F, MatchFloat(<>, 32, 0)), Fcmp(F, MatchFloat(<>, 64, 0)), Fcmp(F, MatchFloat(<<1:1,F:32/float,127:7>>, 32, 1)), Fcmp(F, MatchFloat(<<1:1,F:64/float,127:7>>, 64, 1)), Fcmp(F, MatchFloat(<<1:13,F:32/float,127:3>>, 32, 13)), Fcmp(F, MatchFloat(<<1:13,F:64/float,127:3>>, 64, 13)) end, TFloat(), F2 = fun() -> 2.7133 end, MatchFloatLittle = fun(Bin0, Fsz, I) -> Bin = MakeSubBin(Bin0), Bsz = size(Bin) * 8, Tsz = Bsz - Fsz - I, <<_:I,F:Fsz/float-little,_:Tsz>> = Bin, F end, LittleFloat = fun() -> F = F2(), G = FOne(), G = MatchFloatLittle(<<0,0,0,0,0,0,240,63>>, 64, 0), G = MatchFloatLittle(<<0,0,128,63>>, 32, 0), Fcmp(F, MatchFloatLittle(<>, 32, 0)), Fcmp(F, MatchFloatLittle(<>, 64, 0)), Fcmp(F, MatchFloatLittle(<<1:1,F:32/float-little,127:7>>, 32, 1)), Fcmp(F, MatchFloatLittle(<<1:1,F:64/float-little,127:7>>, 64, 1)), Fcmp(F, MatchFloatLittle(<<1:13,F:32/float-little,127:3>>, 32, 13)), Fcmp(F, MatchFloatLittle(<<1:13,F:64/float-little,127:3>>, 64, 13)) end, LittleFloat(), Sean1 = fun(<>) when size(B) < 4 -> small; (<<1, _B/binary>>) -> large end, Sean = fun() -> small = Sean1(<<>>), small = Sean1(<<1>>), small = Sean1(<<1,2>>), small = Sean1(<<1,2,3>>), large = Sean1(<<1,2,3,4>>), small = Sean1(<<4>>), small = Sean1(<<4,5>>), small = Sean1(<<4,5,6>>), {'EXIT',{function_clause,_}} = (catch Sean1(<<4,5,6,7>>)) end, Sean(), NativeBig = fun() -> <<37.33:64/native-float>> = <<37.33:64/big-float>>, <<3974:16/native-integer>> = <<3974:16/big-integer>> end, NativeLittle = fun() -> <<37869.32343:64/native-float>> = <<37869.32343:64/little-float>>, <<7974:16/native-integer>> = <<7974:16/little-integer>> end, Native = fun() -> <<3.14:64/native-float>> = <<3.14:64/native-float>>, <<333:16/native>> = <<333:16/native>>, <<38658345:32/native>> = <<38658345:32/native>>, case <<1:16/native>> of <<0,1>> -> NativeBig(); <<1,0>> -> NativeLittle() end end, Native(), Split = fun(<>) -> {B,T} end, Split2 = fun(N, <>) -> {B,T} end, Split_2 = fun(<>) -> {B,T} end, Skip = fun(<>) -> T end, SizeVar = fun() -> {<<45>>,<<>>} = Split(<<1:16,45>>), {<<45>>,<<46,47>>} = Split(<<1:16,45,46,47>>), {<<45,46>>,<<47>>} = Split(<<2:16,45,46,47>>), {<<45,46,47>>,<<48>>} = Split_2(<<16:8,3:16,45,46,47,48>>), {<<45,46>>,<<47>>} = Split2(2, <<2:16,45,46,47>>), {'EXIT',{function_clause,_}} = (catch Split2(42, <<2:16,45,46,47>>)), <<"cdef">> = Skip(<<2:8,"abcdef">>) end, SizeVar(), Wcheck = fun(<>) when A==3-> ok1; (<<_,_:2/binary>>) -> ok2; (<<_>>) -> ok3; (Other) -> {error,Other} end, Wiger = fun() -> ok1 = Wcheck(<<3>>), ok2 = Wcheck(<<1,2,3>>), ok3 = Wcheck(<<4>>), {error,<<1,2,3,4>>} = Wcheck(<<1,2,3,4>>), {error,<<>>} = Wcheck(<<>>) end, Wiger(), ok. === Ended at 2014-01-03 20:20:04 === successfully completed test case === returned value = ok


Test run history | Top level test index