aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-09-08 08:53:22 +0200
committerBjörn Gustavsson <[email protected]>2015-09-11 12:24:36 +0200
commit1d00d0df6ff344e3a0ef58a5636ad32259ca31b0 (patch)
treef399a36289d6030dc1fa687e113d5baea31fd9b1 /lib
parentb322b7b3fb6765a6965726efa8afac572e60eec7 (diff)
downloadotp-1d00d0df6ff344e3a0ef58a5636ad32259ca31b0.tar.gz
otp-1d00d0df6ff344e3a0ef58a5636ad32259ca31b0.tar.bz2
otp-1d00d0df6ff344e3a0ef58a5636ad32259ca31b0.zip
lists_SUITE: Correct test of lists:flatten/2
The test that was supposed to call lists:flatten/2 called lists:flatten/1!
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/test/lists_SUITE.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stdlib/test/lists_SUITE.erl b/lib/stdlib/test/lists_SUITE.erl
index e886a797f0..4a15bb9b81 100644
--- a/lib/stdlib/test/lists_SUITE.erl
+++ b/lib/stdlib/test/lists_SUITE.erl
@@ -2351,11 +2351,11 @@ flatten_1_e(Config) when is_list(Config) ->
%%% clear-cut. Right now, I think that any term should be allowed.
%%% But I also wish this function didn't exist at all.
-flatten_2(doc) -> ["flatten/2"];
-flatten_2(suite) -> [];
+%% Test lists:flatten/2.
flatten_2(Config) when is_list(Config) ->
- ?line [] = lists:flatten([]),
- ?line [a] = lists:flatten([a]),
+ [] = lists:flatten([], []),
+ [a] = lists:flatten([a], []),
+ [a,b,c,[no,flatten]] = lists:flatten([[a,[b,c]]], [[no,flatten]]),
ok.
flatten_2_e(doc) -> ["flatten/2 error cases"];