aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-08-03 16:48:07 +0200
committerBjörn Gustavsson <[email protected]>2010-08-03 16:48:07 +0200
commit2257135c992df32554abbb996b028fdbbda39343 (patch)
treebf43ee9ac96f83272044b08898d835a8337f9aaa /lib/compiler/test
parent1e578bf7f9bfdb8c488d2f5837d2041cc3ddf5ba (diff)
parent173d1fd1c3fef385f73accc4b2bbb1b6f92ac3f5 (diff)
downloadotp-2257135c992df32554abbb996b028fdbbda39343.tar.gz
otp-2257135c992df32554abbb996b028fdbbda39343.tar.bz2
otp-2257135c992df32554abbb996b028fdbbda39343.zip
Merge branch 'pg/optimize_beam_dict_string_table' into dev
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/compilation_SUITE.erl13
-rw-r--r--lib/compiler/test/compilation_SUITE_data/string_table.erl8
2 files changed, 20 insertions, 1 deletions
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index d4843c9eba..9c06740816 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -46,7 +46,7 @@ all(suite) ->
trycatch_4, opt_crash,
otp_5404,otp_5436,otp_5481,otp_5553,otp_5632,
otp_5714,otp_5872,otp_6121,otp_6121a,otp_6121b,
- otp_7202,otp_7345,on_load
+ otp_7202,otp_7345,on_load,string_table
].
-define(comp(N),
@@ -596,4 +596,15 @@ otp_7345(ObjRef, _RdEnv, Args) ->
10},
id(LlUnitdataReq).
+%% Check the generation of the string table.
+
+string_table(Config) when is_list(Config) ->
+ ?line DataDir = ?config(data_dir, Config),
+ ?line File = filename:join(DataDir, "string_table.erl"),
+ ?line {ok,string_table,Beam,[]} = compile:file(File, [return, binary]),
+ ?line {ok,{string_table,[StringTableChunk]}} = beam_lib:chunks(Beam, ["StrT"]),
+ ?line {"StrT", <<"stringabletringtable">>} = StringTableChunk,
+ ok.
+
+
id(I) -> I.
diff --git a/lib/compiler/test/compilation_SUITE_data/string_table.erl b/lib/compiler/test/compilation_SUITE_data/string_table.erl
new file mode 100644
index 0000000000..1da1d015dd
--- /dev/null
+++ b/lib/compiler/test/compilation_SUITE_data/string_table.erl
@@ -0,0 +1,8 @@
+-module(string_table).
+-export([f/1, g/1]).
+
+f(<<"string">>) -> string;
+f(<<"stringtable">>) -> stringtable.
+
+g(<<"stringtable">>) -> stringtable;
+g(<<"table">>) -> table.