Commits

arkdro  committed 708ad0a

add round_trip parameters

  • Participants
  • Parent commits 781a4a4
  • Branches floats

Comments (0)

Files changed (2)

File erlang/test/num_SUITE.erl

 
 do_one_operation(Ops) ->
     Cur = random_choice(Ops),
-    D1 = gen_one_decimal(),
-    D2 = gen_one_decimal(),
+    D1 = gen_one_decimal(ct:get_config(round_trip)),
+    D2 = gen_one_decimal(ct:get_config(round_trip)),
     {R1, R2} = do_op(Cur, D1, D2),
     Verbose = ct:get_config(verbose, 0),
     if Verbose > 2 ->
     {Res, Cur, D1, D2, R1, R2}.
 
 gen_one_decimal() ->
+    gen_one_decimal(false).
+
+gen_one_decimal(true) ->
+    ct:get_config(round_trip_data);
+gen_one_decimal(_) ->
     Sign = gen_sign(),
     Exp = gen_exponent(),
     Mant = gen_mantissa(),

File erlang/test/test.config

 {odn_cookie, "cookietest"}.
 
 {warm_up_time, 1000}. %% time between odn_prog start and tests
-{length, 1000}. %% length of test sequence
+{length, 1}. %% length of test sequence
 {vector_length, 2}. %% length of one list to operate on
 
 %% random sign for decimals
 {do_compare, true}.
 {do_ocaml_calc, true}.
 {do_decimal_calc, true}.
+{round_trip, true}.
+{round_trip_data, 1.1}.