aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compile_SUITE_data/small_maps.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-01-31 13:20:04 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-01-31 13:23:30 +0100
commitf2abb08616e4fe2b2f8ea457728e33c91ef5e83e (patch)
treed38a8c5e6abd15fbf32a49211ff8e5836863dd54 /lib/compiler/test/compile_SUITE_data/small_maps.erl
parentf0c74df09a32588367f3ed23861af823425f4efd (diff)
downloadotp-f2abb08616e4fe2b2f8ea457728e33c91ef5e83e.tar.gz
otp-f2abb08616e4fe2b2f8ea457728e33c91ef5e83e.tar.bz2
otp-f2abb08616e4fe2b2f8ea457728e33c91ef5e83e.zip
compiler: Strengthen listings tests
Diffstat (limited to 'lib/compiler/test/compile_SUITE_data/small_maps.erl')
-rw-r--r--lib/compiler/test/compile_SUITE_data/small_maps.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/compiler/test/compile_SUITE_data/small_maps.erl b/lib/compiler/test/compile_SUITE_data/small_maps.erl
new file mode 100644
index 0000000000..a17a136a7d
--- /dev/null
+++ b/lib/compiler/test/compile_SUITE_data/small_maps.erl
@@ -0,0 +1,16 @@
+-module(small_maps).
+
+-export([go/0,go/1]).
+
+go() ->
+ go(1337).
+
+go(V0) ->
+ M0 = #{ a => 1, val => V0},
+ V1 = get_val(M0),
+ M1 = M0#{ val := [V0,V1] },
+ {some_val,[1337,{some_val,1337}]} = get_val(M1),
+ ok.
+
+get_val(#{ "wazzup" := _, val := V}) -> V;
+get_val(#{ val := V }) -> {some_val, V}.