aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2014-03-17stdlib: Move map type to proper definitionBjörn-Egil Dahlberg
2014-03-07Emit errors when redefining arity(), bitstring(), iodata(), or boolean()Hans Bolinder
erl_lint has since R13B emitted warnings whenever any of the types arity(), bitstring(), iodata(), or boolean() were re-defined. Now errors are emitted instead.
2014-03-07stdlib: Emit linter warnings for redefined built-in typesHans Bolinder
Since Erlang/OTP R16B the linter has not emitted warnings when built-in types were re-defined. This bug has been fixed. Thanks to Roberto Aloi for reporting the bug.
2014-03-06Merge branch 'nox/maps-improve-erl_lint'Björn-Egil Dahlberg
* nox/maps-improve-erl_lint: Improve linting of map expressions
2014-03-06Merge branch 'hb/stdlib/fix_dets/OTP-11709'Hans Bolinder
* hb/stdlib/fix_dets/OTP-11709: stdlib: Fix a Dets bug where files were deleted stdlib: Fix a Dets bug with leaking file descriptors
2014-03-05stdlib: Fix a Dets bug where files were deletedHans Bolinder
Instead of deleting the small file when opening it with dets:open_file/2 an error message is returned, mimicking the behaviour when the file is bigger. open_file/1 has been modified to return the same error message when the file is small as when the file is bigger. Thanks to Hakan Mattson for reporting this bug.
2014-03-05stdlib: Fix a Dets bug with leaking file descriptorsHans Bolinder
Thanks to Hakan Mattson for reporting this bug.
2014-03-05Merge branch 'nox/compiler/lint-shortcircuit-ops'Björn Gustavsson
* nox/compiler/lint-shortcircuit-ops: Properly lint shortcircuiting operators
2014-03-05Merge branch 'hb/dialyzer/deprecate_types/OTP-10342'Hans Bolinder
* hb/dialyzer/deprecate_types/OTP-10342: Introduce compiler option 'nowarn_deprecated_type' Improve message about deprecated built-in types
2014-03-04Introduce compiler option 'nowarn_deprecated_type'Hans Bolinder
The deprecation of the built-in types dict/0 and so on had as side-effect that it was impossible to switch to dict:dict/2 and so on without getting warnings either in the the previous release (R16B) or the current one (17.0). By including the attribute -compile(nowarn_deprecated_type). in an Erlang source file warnings about deprecated types can be avoided in 17.0. The option can also be given as a compiler flag: erlc +nowarn_deprecated_type file.erl
2014-03-04Improve message about deprecated built-in typesHans Bolinder
2014-03-04Improve linting of map expressionsAnthony Ramine
Map fields are put in their own function instead of being clauses of expr/3. Also, invalid map construction expressions now emit one error per ':=' field, at the location of said field instead of one for the whole expression, furthermore, such warnings do not stop linting of their key and value expressions anymore. Ill-formed maps constructions are now also properly detected in guard expressions.
2014-03-03Fix a qlc bug where filters were erroneously optimized awayHans Bolinder
Thanks to Sam Bobroff for reporting the bug.
2014-03-01Properly lint shortcircuiting operatorsAnthony Ramine
Shortcircuiting operators are not real functions and can't be used as such with erlang:'andalso'(...) and erlang:'orelse'(...). Reported-by: Ulf Norell
2014-02-24Merge branch 'lukas/ose/master/OTP-11334'Lukas Larsson
* lukas/ose/master/OTP-11334: (71 commits) erts: Fix unix efile assert ose: Use -O2 when building ose: Expand OSE docs ose: Add dummy ttsl driver ose: Cleanup cleanup of mutex selection defines ose: Polish mmap configure checks ose: Add ose specific x-compile flags ose: Updating fd_driver and spawn_driver for OSE ose: Updating event and signal API for OSE ose: Cleanup of mutex selection defines win32: Compile erl_log.exe ose: Remove uneccesary define ose: Fix ssl configure test for osx erts: Fix sys_msg_dispatcher assert ose: Fix broken doc links ose: Thread priorities configurable from lmconf ose: Yielding the cpu is done "the OSE" way ose: Start using ppdata for tse key ose: Do not use spinlocks on OSE ose: Fix support for crypto ... Conflicts: lib/crypto/c_src/crypto.c
2014-02-24Merge branch 'josevalim/jv-eval-guards/OTP-11747'Henrik Nord
* josevalim/jv-eval-guards/OTP-11747: Fix erl_eval bug when erlang:'=='/2 is used in guards
2014-02-24ose: Fix stdlib testcasesLukas Larsson
2014-02-24Merge branch 'siri/master-cuddle-with-tests'Siri Hansen
* siri/master-cuddle-with-tests: Use default timetrap (30 min) for kernel, stdlib and sasl app tests Unload 'deadlock' application in application_SUITE:shutdown_deadlock
2014-02-23Deprecate pre-defined built-in typesHans Bolinder
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(), set(), and tid() have been deprecated. They will be removed in OTP 18.0. Instead the types array:array(), dict:dict(), digraph:graph(), gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid() can be used. (Note: it has always been necessary to use ets:tid().) It is allowed in OTP 17.0 to locally re-define the types array(), dict(), and so on. New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2, queue:queue/1, and sets:set/1 have been added.
2014-02-21Use default timetrap (30 min) for kernel, stdlib and sasl app testsSiri Hansen
These tests start new nodes, and they frequently timed out on some slow test hosts.
2014-02-21Merge branch 'hb/stdlib/epp_bug_fix/OTP-11728'Hans Bolinder
* hb/stdlib/epp_bug_fix/OTP-11728: Fix a bug in epp concerning circular macro definitions
2014-02-20Merge branch 'siri/appup_tests_17/OTP-11534'Siri Hansen
* siri/appup_tests_17/OTP-11534: Update sasl/test/test_lib.hrl with recent versions of kernel and stdlib Update appups and appup tests for kernel, stdlib and sasl
2014-02-20Fix a bug in epp concerning circular macro definitionsHans Bolinder
epp could loop when encountering a circular macro definition in an included file. Thanks to Maruthavanan Subbarayan for reporting the bug, and to Richard Carlsson for providing a bug fix.
2014-02-20Merge branch 'fenollp/shell-expand-0arity-completely'Björn Gustavsson
* fenollp/shell-expand-0arity-completely: Correct parenthesis expansion Clean up edlin_expand_SUITE.erl to facilitate maintainance
2014-02-19Merge branch 'sverk/ets-all-race'Sverker Eriksson
OTP-11726 * sverk/ets-all-race: erts: Fix faulty asserts in erts_sys_aligned_alloc/free erts: Fix harmless (?) typo in beam_load.c erts: Fix race bug in ets:all/0
2014-02-19erts: Fix race bug in ets:all/0Sverker Eriksson
causing recently created/deleted tables to not be included/excluded.
2014-02-17Correct parenthesis expansionBjörn Gustavsson
Commit dfb4ec804a099b539c91e5643090d8183885e71c attempted to add a closing parenthesis to the expansion of a funtion of zero arity if there were no other functions with the same name. Unfortunately it would add the closing parenthesis in many cases when there was another function with another name (e.g. to Mod:module_info/0 even though there is a Mod:module_info/1). Correct logic for adding parenthesis and add a test case.
2014-02-17Clean up edlin_expand_SUITE.erl to facilitate maintainanceBjörn Gustavsson
* Introduce the helper function do_expand/1. * Remove all ?line macros.
2014-02-14Merge branch 'nox/maps-improve-erl_expand_records'Björn-Egil Dahlberg
* nox/maps-improve-erl_expand_records: Fix expansion of records in maps
2014-02-12Update appups and appup tests for kernel, stdlib and saslSiri Hansen
Appups now only support one major release back, and the tests are updated accordingly. Support is also added in tests for giving previous releases in a ct config file, e.g. {otp_releases,[{r15,"/path/to/r15/bin/erl"}, {r16,"/path/to/r16/bin/erl"}, {'17',"/path/to/17/bin/erl"}]}.
2014-02-12Merge branch 'nox/maps-erl_prettypr'Björn-Egil Dahlberg
* nox/maps-erl_prettypr: stdlib: Add tests for Maps in erl_prettypr Support maps in erl_prettypr
2014-02-12Merge branch 'nox/maps-improve-erl_eval'Björn-Egil Dahlberg
* nox/maps-improve-erl_eval: Handle map fields in their own function in erl_eval
2014-02-11Merge branch 'fenollp/shell-expand-0arity-completely'Henrik Nord
* fenollp/shell-expand-0arity-completely: Shell: expand 0-arity functions all the way to closing parenthesis OTP-11684
2014-02-10Merge branch 'josevalim/suppress-all-auto-imports'Henrik Nord
* josevalim/suppress-all-auto-imports: Allow all auto imports to be suppressed at once OTP-11682
2014-02-07Merge branch 'hsv/add_droplast_to_lists'Henrik Nord
* hsv/add_droplast_to_lists: Added documentation of lists:droplast/1 Added tests for lists:droplast/1 to stdlib/lists_SUITE stdlib/lists: Add function droplast/1 This functions drops the last element of a non-empty list.
2014-02-04Fix expansion of records in mapsAnthony Ramine
Records were not properly expanded in keys in patterns and in arguments in map updates.
2014-02-03stdlib: Add tests for Maps in erl_prettyprBjörn-Egil Dahlberg
2014-02-01Handle map fields in their own function in erl_evalAnthony Ramine
Map fields (K := V, K => V) are not expressions and shouldn't be clauses of erl_eval:expr/5.
2014-01-29Merge branch 'egil/maps/OTP-11616'Björn-Egil Dahlberg
* egil/maps/OTP-11616: (112 commits) compiler: Add core compile test for maps compiler: Fix core parse for Maps compiler: Fixup #map_pair{} spec erts: Strengthen map_SUITE tests erts: Update maps_fold test to respect maps:fold/3 stdlib: Make maps:fold/3 order-independent erts: Fixup enif_make_map_put on windows erts: Update preloaded erts_internal.beam hipe: Fixup update cerl pretty printer erts: Add map construction to driver API dialyzer: Add maps tests dialyzer: Remove dead code dialyzer: Reflect map_pair core changes in dialyzer hipe: Update cerl pretty printer compiler: Update inliner tests compiler: Squash #c_map_pair_*{} to #c_map_pair{} compiler: Squash #k_map_pair_*{} to #k_map_pair{} preloaded: Fixup export cmp_term in erts_internal erts: Change 'size' argument of enif_get_map_size from int* to size_t* erts: Fix compile error for halfword emulator ...
2014-01-28Merge branch 'siri/appup_tests_17/OTP-11534'Siri Hansen
* siri/appup_tests_17/OTP-11534: Update sasl appup test to work for OTP release 17 Update stdlib appup test to work for OTP release 17 Update kernel appup test to work for OTP release 17
2014-01-28stdlib: Update erl_scan_SUITE for ':=' and '=>' tokensBjörn-Egil Dahlberg
2014-01-28Update stdlib appup test to work for OTP release 17Siri Hansen
2014-01-24Added tests for lists:droplast/1 to stdlib/lists_SUITEHans Svensson
2014-01-23Fix erl_eval bug when erlang:'=='/2 is used in guardsJosé Valim
Prior to this commit, erl_eval did not properly evaluate erlang:'=='/2 and friends in guard clauses because it always flattened it to a local call ==/2. This commit removes the flattening logic while still normalizing old guards style.
2014-01-23Properly handle export_all when looking for undefined callbacksAnthony Ramine
Reported-by: Michele Miron
2014-01-21Fix testing with unicode pathsDan Gudmundsson
re needs unicode option
2014-01-09Shell: expand 0-arity functions all the way to closing parenthesisPierre Fenoll
`erl` has tab completion for modules' exported functions but expands only up to the opening paren. This commit closes that opening paren in case the function is of arity zero and there is no other function with the same name. It browses the lists of matches (a 2nd time) for Arity, on complete match and then decides what to append.
2013-12-12Test named funsAnthony Ramine
2013-10-22Merge branch 'mh/dict_orddict_is_empty/OTP-11353'Fredrik Gustafsson
* mh/dict_orddict_is_empty/OTP-11353: Update primary bootstrap Add dict:is_empty/1 and orddict:is_empty/1
2013-10-18Allow all auto imports to be suppressed at onceJosé Valim
This patch introduces the no_auto_import attribute: -compile(no_auto_import). Useful for code generation tools that always use the qualified function names and want to avoid the auto imported functions clashing with local ones. Implementation wise, we chose to have a special flag 'all' to avoid doing many set lookups when checking for suppression.