aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2016-04-12Fix missing short forms for event timeoutRaimo Niskanen
2016-03-02Change code_change/4 to {ok,State,Data}Raimo Niskanen
2016-03-02Fixup sharpened test suiteRaimo Niskanen
2016-02-29Sharpen test suiteRaimo Niskanen
2016-02-29Remove the remove_event action and all alikeRaimo Niskanen
Removing events from the internal queues is not necessary with the choosen semantics of the event queue vs. hibernate. In an early implementation it was possible by combining hibernate with e.g. postpone to get an event in the queue that you would not see before processing the postponed event, and therefore should you decide to cancel a timer it was essential to be able to remove that unseen event from the queue. With the choosen semantics you will have to postpone or generate an event for it to be in the event queue, and if you e.g. postpone a timeout event and then cancel the timer it is your mistake. You have seen the event and should know better than to try to cancel the timer. So, the actions: remove_event, cancel_timer, demonitor and unlink are now removed. There have also been some cleanup of the timer handling code.
2016-02-26Test the order for multiple next_eventRaimo Niskanen
2016-02-26ct:ify test suiteRaimo Niskanen
2016-02-26Allow actions without containing listRaimo Niskanen
Type check atom state as early as possible
2016-02-26Implement 'keep_state_and_data' and 'stop'Raimo Niskanen
2016-02-25Remove {keep_state_and_data}Raimo Niskanen
Correct typo reported by Luïc Hoguin.
2016-02-24Ditch PrevStateRaimo Niskanen
StateName/4 -> StateName/3 handle_event/5 -> handle_event/4
2016-02-24Ditch State so StateName/5 -> StateName/4Raimo Niskanen
2016-02-23Add {stop_and_reply,Reason,Replies [,Data])Raimo Niskanen
Cleanup some error handling
2016-02-22Make callback_option() mandatoryRaimo Niskanen
2016-02-19Update terminology to data(), transition_op(), etcRaimo Niskanen
2016-02-19Add reply([Reply])Raimo Niskanen
2016-02-19Add {keep_state,...} and {keep_state_and_data,...}Raimo Niskanen
2016-02-18Write some convenience helpersRaimo Niskanen
2016-02-18Rename retry -> postponeRaimo Niskanen
2016-02-18Rename insert_event -> next_eventRaimo Niskanen
2016-02-18Implement option callback_modeRaimo Niskanen
2016-02-16Change to {next_state,...} and {stop,...} return formatRaimo Niskanen
2016-02-09New state machineRaimo Niskanen
2015-12-07Merge branch 'bjorn/stdlib/rand-export_seed/OTP-13162' into maintBjörn Gustavsson
* bjorn/stdlib/rand-export_seed/OTP-13162: Correct rand:export_seed/0 when there is no prior seed
2015-12-07Correct rand:export_seed/0 when there is no prior seedBjörn Gustavsson
According to the documentation, rand:export_seed/0 should return 'undefined' if the seed has not been intialized. However, it will create and return a seed. That means that the following code will not work as expected: case rand:export_seed() of undefined -> rand:seen({1,2,3}); _ -> ok end, rand:uniform(Range)
2015-12-07stdlib: Correct pretty-printing of map typesHans Bolinder
Add parentheses around annotated type union elements in map pair types. The bug was introduced in Erlang/OTP 18.0.
2015-12-03Extend erl_lint:format_error/1 to handle bittype mismatchesBjörn Gustavsson
erl_lint:format_error/1 would crash with a function error if conflicting types were given. That was most easily noticed in the shell: Eshell V7.0.3 (abort with ^G) 1> <<0/integer-binary>>. *** ERROR: Shell process terminated! *** Noticed-by: Aleksei Magusev
2015-12-03erl_lint_SUITE: Add smoke test of format_error/1Björn Gustavsson
The test suite depended on the compiler to call erl_lint:format_error/1 to ensure that format_error/1 was covered. Unfortunately, though, if format_error/1 crashed the compiler would catch the exception so that the test suite would not notice it. Add a smoke test of format_error/1 that will crash if there is any problem with erl_lint:format_error/1.
2015-09-17stdlib: Fix leaking files after error_logger:logfile(close)Dan Gudmundsson
Introduced when changing state from tuple to record.
2015-09-14Merge branch 'bjorn/cuddle-with-tests' into maintBjörn Gustavsson
* bjorn/cuddle-with-tests: (23 commits) rand_SUITE: Speed up basic_stats/1 base64_SUITE: Speed up roundtrip/1 lists_SUITE: Test lists:concat/2 lists_SUITE: Test lists:split/2 lists_SUITE: Add a test case for lists:prefix/2 lists_SUITE: Add hof/1 to test all high-order functions lists_SUITE: Add test for lists:takewhile/1 lists_SUITE: Run test cases in each group in parallel lists_SUITE: Test lists:keyreplace/4 lists_SUITE: Extend flatten/1 test to also test flatlength/1 lists_SUITE: Correct test of lists:flatten/2 id_transform_SUITE: Modernize test suite io_proto_SUITE: Speed up determination of default shell io_proto_SUITE: Refactor up rtnode() and friends gen_event_SUITE: Remove unnecessary sleep calls proc_lib: Improve coverage for crash/1 proc_lib_SUITE: Eliminate compiler warnings io_SUITE: Add coverage/1 to completely cover io_lib_pretty io_SUITE: Extend coverage of code for testing printable chars io_SUITE: Speed up test for bad +pc option ...
2015-09-11rand_SUITE: Speed up basic_stats/1Björn Gustavsson
Refactor basic_stats/1 into three separate test cases that can be run in parallel.
2015-09-11base64_SUITE: Speed up roundtrip/1Björn Gustavsson
Refactor roundtrip/1 into 4 test cases that can be run in parallel. Assuming that there are 4 cores available, the group of 4 test cases will run at roughly one fourth of the time for the original test case.
2015-09-11lists_SUITE: Test lists:concat/2Björn Gustavsson
2015-09-11lists_SUITE: Test lists:split/2Björn Gustavsson
2015-09-11lists_SUITE: Add a test case for lists:prefix/2Björn Gustavsson
2015-09-11lists_SUITE: Add hof/1 to test all high-order functionsBjörn Gustavsson
2015-09-11lists_SUITE: Add test for lists:takewhile/1Björn Gustavsson
2015-09-11lists_SUITE: Run test cases in each group in parallelBjörn Gustavsson
On my computer, this will shave off more than one second of the runnning time and about 4 seconds when cover is being run.
2015-09-11lists_SUITE: Test lists:keyreplace/4Björn Gustavsson
2015-09-11lists_SUITE: Extend flatten/1 test to also test flatlength/1Björn Gustavsson
2015-09-11lists_SUITE: Correct test of lists:flatten/2Björn Gustavsson
The test that was supposed to call lists:flatten/2 called lists:flatten/1!
2015-09-11id_transform_SUITE: Modernize test suiteBjörn Gustavsson
Remove handling of Clearcase; remove ?line macros.
2015-09-11io_proto_SUITE: Speed up determination of default shellBjörn Gustavsson
Use getline_pred action that fails fast if the shell is not the oldshell, to avoid having to wait for the timeout.
2015-09-11io_proto_SUITE: Refactor up rtnode() and friendsBjörn Gustavsson
Introduce a new {getline_pred, Fun, Msg} action that is useful in itself, but can also be used to share more code for {getline, Match} and {getline_re, Match}. Also get rid of the ?line macros in rtnode() so that we can somewhat reduce the ridculous indentation level.
2015-09-11gen_event_SUITE: Remove unnecessary sleep callsBjörn Gustavsson
The calls to test_server:sleep/1 are unnecessary as the swapping of handlers happens in a single process. Even though the {swap_info,...} message is sent asynchronously, the gen_event:which_handlers/1 call will not have a chance to execute until the handlers have been swapped.
2015-09-11proc_lib: Improve coverage for crash/1Björn Gustavsson
First refactor the entire test case using helper functions to facilitate further maintenance. Then test that proc_lib can handle that the process dictionary has been erased (that will cover more code in proc_lib). We can also shave off 2 seconds of the execution time by testing the 'shutdown' exit reasons at beginning of the test case instead of doing it at the end.
2015-09-11proc_lib_SUITE: Eliminate compiler warningsBjörn Gustavsson
Use error/1 instead of forcing a badmatch.
2015-09-11io_SUITE: Add coverage/1 to completely cover io_lib_prettyBjörn Gustavsson
2015-09-11io_SUITE: Extend coverage of code for testing printable charsBjörn Gustavsson
2015-09-11io_SUITE: Speed up test for bad +pc optionBjörn Gustavsson
Move the test for a bad +pc option to its own test case for cleanliness. Use the os:cmd/1 function to avoid the annyoying 30 seconds time-out in test_server:start_node/3.