Age | Commit message (Collapse) | Author |
|
|
|
Call test_lib:recompile/1 from init_per_suite/1 instead of
from all/0. That makes it easy to find the log from the
compilation in the log file for the init_per_suite/1 test
case.
|
|
|
|
|
|
|
|
|
|
?config is ugly and not recommended. Use proplists:get_value/2
instead.
|
|
Either rely on the default 30 minutes timetrap, or set the timeout
using the supported methods in common_test.
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
|
|
Introduce access functions to hide the low-level details of how
type information is implemented.
|
|
Calls to erlang:is_record/3 where the second and third arguments are not
respectively a literal atom and a literal integer can't be transformed to guards
and thus are not safe.
Reported-by: Ulf Norell
|
|
|
|
Run testcases in parallel will make the test suite run slightly
faster. Another reason for this change is that we want more testing
of parallel testcase support in common_test.
|
|
Since the introduction of improved record optimizations in
1858cb81391d2bce29b4b7620574ca60128cebf7 and
470c91d43eae54f63661645acbce4b92d73287cc, the optimization of
a is_record/3 call with a known correct type in
beam_type:simplify_basic_1/3 has not been covered.
|
|
In 3d0f4a3085f11389e5b22d10f96f0cbf08c9337f (an update to conform
with common_test), in all test_lib:recompile(?MODULE) calls, ?MODULE
was changed to the actual name of the module. That would cause
test_lib:recompile/1 to compile the module with the incorrect
compiler options in cloned modules such as record_no_opt_SUITE,
causing worse coverage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Original patch from YAMASHINA Hio posted to erlang-patches@
on Tue Jun 12 11:27:53 CEST 2007:
http://www.erlang.org/pipermail/erlang-patches/2007-June/000182.html
http://fleur.hio.jp/pub/erlang/record2.patch
Only had to do minor changes to port the patch to the
current R14A development tree.
Also added compiler/record_SUITE:nested_access/2 to test
nested record access with or without parentheses.
With this change the following will work.
-record(nrec0, {name = <<"nested0">>}).
-record(nrec1, {name = <<"nested1">>, nrec0=#nrec0{}}).
-record(nrec2, {name = <<"nested2">>, nrec1=#nrec1{}}).
nested_access() ->
N0 = #nrec0{},
N1 = #nrec1{},
N2 = #nrec2{},
<<"nested0">> = N0#nrec0.name,
<<"nested1">> = N1#nrec1.name,
<<"nested2">> = N2#nrec2.name,
<<"nested0">> = N1#nrec1.nrec0#nrec0.name,
<<"nested0">> = N2#nrec2.nrec1#nrec1.nrec0#nrec0.name,
<<"nested1">> = N2#nrec2.nrec1#nrec1.name,
<<"nested0">> = ((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0.name,
N1a = N2#nrec2.nrec1#nrec1{name = <<"nested1a">>},
<<"nested1a">> = N1a#nrec1.name,
N2a = N2#nrec2.nrec1#nrec1.nrec0#nrec0{name = <<"nested0a">>},
N2b = ((N2#nrec2.nrec1)#nrec1.nrec0)#nrec0{name = <<"nested0a">>},
<<"nested0a">> = N2a#nrec0.name,
N2a = N2b,
ok.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
|