aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/test/map_SUITE.erl
AgeCommit message (Collapse)Author
2016-04-18Replace "%" 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-04-18Eliminate use of test_server:fail/{0,1}Björn Gustavsson
2015-12-11debugger tests: Replace 'random' with 'rand'Björn Gustavsson
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-25debugger: Relax test map_SUITE:t_guard_receive_large/1Björn-Egil Dahlberg
Would timeout on slow machines and was unnecessary large.
2015-04-30debugger test suite: Scale down t_frequency_table/1Björn Gustavsson
t_frequency_table/1 would take about 40 seconds on my computer. Scale down the number of iterations 100 times to speed it up. The large number of iterations does not find any more bugs in the debugger.
2015-04-15Raise more descriptive error messages for failed map operationsBjörn Gustavsson
According to EEP-43 for maps, a 'badmap' exception should be generated when an attempt is made to update non-map term such as: <<>>#{a=>42} That was not implemented in the OTP 17. José Valim suggested that we should take the opportunity to improve the errors coming from map operations: http://erlang.org/pipermail/erlang-questions/2015-February/083588.html This commit implement better errors from map operations similar to his suggestion. When a map update operation (Map#{...}) or a BIF that expects a map is given a non-map term, the exception will be: {badmap,Term} This kind of exception is similar to the {badfun,Term} exception from operations that expect a fun. When a map operation requires a key that is not present in a map, the following exception will be raised: {badkey,Key} José Valim suggested that the exception should be {badkey,Key,Map}. We decided not to do that because the map could potentially be huge and cause problems if the error propagated through links to other processes. For BIFs, it could be argued that the exceptions could be simply 'badmap' and 'badkey', because the bad map and bad key can be found in the argument list for the BIF in the stack backtrace. However, for the map update operation (Map#{...}), the bad map or bad key will not be included in the stack backtrace, so that information must be included in the exception reason itself. For consistency, the BIFs should raise the same exceptions as update operation. If more than one key is missing, it is undefined which of keys that will be reported in the {badkey,Key} exception.
2015-03-30debugger: Strengthen Maps testsBjörn-Egil Dahlberg
2015-03-27debugger: Strengthen Maps testsBjörn-Egil Dahlberg
2015-03-12erts: Make is_members in map_SUITE's more stringentSverker Eriksson
2015-03-12debugger: Fix maps testcase unordered enc/decBjörn-Egil Dahlberg
2015-03-12debugger: Update map tests for unordered mapsBjörn-Egil Dahlberg
2014-08-26debugger: Update Map testsBjörn-Egil Dahlberg
2014-03-18Merge branch 'nox/maps-eval-empty-update'Björn-Egil Dahlberg
* nox/maps-eval-empty-update: Fix evaluation of empty map patterns in erl_lint Fix evaluation of empty map updates in the debugger Fix evaluation of empty map updates in erl_eval
2014-03-15Fix evaluation of empty map updates in the debuggerAnthony Ramine
2014-03-14erts: Change external format for mapsSverker Eriksson
to be: 116,Arity, K1,V1,K2,V2,...,Kn,Vn instead of: 116,Arity, K1,K2,...,Kn, V1,V2,....,Vn We think this will be better for future internal map structures like HAMT. Would be bad if we need to iterate twice over HAMT in term_to_binary, one for keys and one for values.
2014-02-04Support maps in the debuggerAnthony Ramine
A test is commented-out in map_SUITE:t_update_exact/1, waiting for a fixed maps:update/3 function with correct integer/float semantics.