aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2016-04-27stdlib: Add tests for maps:update_with/3,4Björn-Egil Dahlberg
2016-04-27Fix callback mode after code change not usedRaimo Niskanen
2016-04-25Merge branch 'raimo/new-gen-state-machine/OTP-13065'Raimo Niskanen
* raimo/new-gen-state-machine/OTP-13065: (52 commits) Add section on state filtering Promote gen_statem over gen_fsm Modify code_change/4 to return CallbackMode Use ?NAME macro in examples Introduce Fred Herbert suggested additions Introduce corrections from Fred Hebert and Ingela Use .png pictures instead of .gif Write Design Principles chapter Fix missing short forms for event timeout Do more intricate Fred Hebert doc changes Change Caller -> From as suggested by Fred Hebert Do documentation improvements from Fred Hebert Fix broken documenation reference Rename state_timeout -> event_timeout Fix most of the system docs and emacs mode Change code_change/4 to {ok,State,Data} Fixup sharpened test suite Sharpen test suite Remove the remove_event action and all alike Relax caller() type check and cleanup ... Conflicts: lib/stdlib/src/gen.erl lib/stdlib/src/gen_event.erl lib/stdlib/src/gen_fsm.erl lib/stdlib/src/gen_server.erl lib/stdlib/test/error_logger_forwarder.erl
2016-04-25stdlib: Remove use of crypto:rand_bytes/1Ingela Anderton Andin
The use case is not cryptographical but we want to compare Erlang implementation to c implementation so use crypto:strong_rand_bytes anyway.
2016-04-21Modify code_change/4 to return CallbackModeRaimo Niskanen
Also move check of non-atom states in callback mode state_functions to where the state function is called. This gives homogenous diagnostics for state functions, code_change/4 and system_replace_state StateFun. Irregularities pointed out by James Fish.
2016-04-18stdlib: The type map() is built-inHans Bolinder
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-12Fix missing short forms for event timeoutRaimo Niskanen
2016-04-09Implement lists:join/2Jesper Louis Andersen
Add a call which works much like string:join/2 but for arbitrary lists. Provide the function itself, lifted from Haskells Data.List standard library, provide documentation and provide tests for the function.
2016-04-05Merge branch 'lukas/stdlib/error_logger_SUITE/OTP-13471'Lukas Larsson
* lukas/stdlib/error_logger_SUITE/OTP-13471: stdlib: Fix logfile testcase for hipelibs testrun
2016-03-30stdlib: Fix logfile testcase for hipelibs testrunLukas Larsson
2016-03-30gen_fsm_SUITE: Make abnormal1/1 stop failingBjörn Gustavsson
abnormal1/1 started failing sporadically when 22785cd1e21 changed using the messages_get/0 and using its own implementation: get_messages() -> receive Msg -> [Msg|get_messages()] after 1 -> [] end. In test_server:messages_get/0, there was "after 0" instead of "after 1" as in this version. We could change back to using "after 0", but it seems that the test case just happened to work before the change. Instead, read out the message that is guranteed to be in the message queue, and *then* check that the message queue is empty.
2016-03-30gen_fsm_SUITE: Use timer:sleep/1 instead of ct:sleep/1Björn Gustavsson
In 8d7d5627, test_server:sleep/1 was changed to ct:sleep/1. Change it to timer:sleep/1 to make the timing more exact (ct:sleep/1 will call another process).
2016-03-15stdlib: Cuddle with ets_SUITE:evil_renameSverker Eriksson
to make it kill and then wait for all spawned processes to exit.
2016-03-15update copyright-yearHenrik Nord
2016-03-09Eliminate use of ?config() macroBjörn Gustavsson
2016-03-09Remove ?line macrosBjörn Gustavsson
While we are it, also re-ident the files.
2016-03-09Replace "%" with "%%" at the beginning of a lineBjörn Gustavsson
We want to re-ident the source files after having taken out all ?line macros. When re-indenting using Emacs, it's important that comments that should be at the beginning of a line (or follow the indentation of statements around it) must start with "%%".
2016-03-09Eliminate 'suite' and 'doc' clausesBjörn Gustavsson
2016-03-09gen_server_SUITE: Eliminate use of test_server:timecall/3Björn Gustavsson
2016-03-09Use 'test_server' instead of ?t macroBjörn Gustavsson
2016-03-09Eliminate use of test_server:messages_get/0Björn Gustavsson
2016-03-09sys_SUITE: Replace test_server:capture*/0 with ct:capture*/0Björn Gustavsson
2016-03-09sys_SUITE: Mend test cases that didn't test what they shouldBjörn Gustavsson
The return values for lists:prefix/2 and lists:member/2 were ignored.
2016-03-09Replace calls to test_server:sleep/1 with ct:sleep/1 or timer:sleep/1Björn Gustavsson
Note that the sleeping time in ct:sleep/1 will be scaled if the test is run with (for example) cover. When it is important that the sleep time is not adjusted, use timer:sleep/1.
2016-03-09Eliminate use of test_server:do_times()Björn Gustavsson
2016-03-09Replace use of test_server:format/2 with io:format/2Björn Gustavsson
There is no practial difference.
2016-03-09Eliminate use of test_server:fail/0,1Björn Gustavsson
2016-03-09Modernize use of timetrapsBjörn Gustavsson
Either rely on the default 30 minutes timetrap, or set the timeout using the supported methods in common_test.
2016-03-09Merge branch 'maint'Siri Hansen
Conflicts: lib/common_test/test/Makefile
2016-03-09Merge branch 'siri/test-ct_release_test/OTP-13390' into maintSiri Hansen
* siri/test-ct_release_test/OTP-13390: Remove upgrade tests from stdlib_SUITE Add test of ct_release_test
2016-03-09Remove upgrade tests from stdlib_SUITESiri Hansen
The test cases minor_upgrade and major_upgrade used ct_release_test. The point of the tests in stdlib was mainly to test ct_release_test. ct_release_test produces a 'from-release' based on an old version of the application under test (in this case stdlib) and new versions of all other applications. But since it is not always a good idea to load an old version of stdlib into a new emulator (e.g. in the OTP-19.0 emulator), these tests are removed. Instead new tests are added for ct_release_test in common_test.
2016-03-09Merge branch 'maint'Björn Gustavsson
* maint: io_SUITE: Don't fail on fast computers with rough timers Fix code_SUITE after test_server change Set default value for crash_dump_dir
2016-03-09Merge branch 'bjorn/cuddle-with-tests' into maintBjörn Gustavsson
* bjorn/cuddle-with-tests: io_SUITE: Don't fail on fast computers with rough timers
2016-03-08Merge branch 'maint'Sverker Eriksson
2016-03-08Merge branch 'sverk/bad_printable_range' into maintSverker Eriksson
* sverk/bad_printable_range: stdlib: Fix io_SUITE:bad_printable_range for windows
2016-03-08Test windows registry in places we are allowed to writeDan Gudmundsson
Since Windows 8 we are not allowed (in non elevated mode) to write to hklm.
2016-03-07stdlib: Fix io_SUITE:bad_printable_range for windowsSverker Eriksson
avoid os:cmd as it treats stderr different on windows.
2016-03-07io_SUITE: Don't fail on fast computers with rough timersBjörn Gustavsson
On a computer which is fast, but with timers with low resolution, the measured time for an empty queue could be zero, which could cause the test case to fail. Add a calibration function to scale up the amount the amount of work so that the measured time will not be lower than 50 ms.
2016-03-02stdlib: Add filename:basedir/2,3Björn-Egil Dahlberg
2016-03-02stdlib: Use parallel groups in filename_SUITEBjörn-Egil Dahlberg
2016-03-02stdlib: Remove ?line macros in filename_SUITEBjörn-Egil Dahlberg
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