From 17637a1353c6be871d4fc4cc17f70b012eebc254 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 10:47:49 +0200 Subject: Update emulator tests to conform with common_test standard --- erts/emulator/test/bs_utf_SUITE.erl | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'erts/emulator/test/bs_utf_SUITE.erl') diff --git a/erts/emulator/test/bs_utf_SUITE.erl b/erts/emulator/test/bs_utf_SUITE.erl index 87adc5197b..0e61952916 100644 --- a/erts/emulator/test/bs_utf_SUITE.erl +++ b/erts/emulator/test/bs_utf_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -19,13 +19,13 @@ -module(bs_utf_SUITE). --export([all/1,init_per_testcase/2,fin_per_testcase/2, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,fin_per_testcase/2, utf8_roundtrip/1,utf16_roundtrip/1,utf32_roundtrip/1, utf8_illegal_sequences/1,utf16_illegal_sequences/1, utf32_illegal_sequences/1, bad_construction/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -define(FAIL(Expr), ?line fail_check(catch Expr, ??Expr, [])). @@ -37,10 +37,20 @@ fin_per_testcase(_Func, Config) -> Dog = ?config(watchdog, Config), ?t:timetrap_cancel(Dog). -all(suite) -> - [utf8_roundtrip,utf16_roundtrip,utf32_roundtrip, - utf8_illegal_sequences,utf16_illegal_sequences, - utf32_illegal_sequences,bad_construction]. +all() -> +[utf8_roundtrip, utf16_roundtrip, utf32_roundtrip, + utf8_illegal_sequences, utf16_illegal_sequences, + utf32_illegal_sequences, bad_construction]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + utf8_roundtrip(Config) when is_list(Config) -> ?line utf8_roundtrip(0, 16#D7FF), -- cgit v1.2.3 From 83f932257470f5ae01fc61130e997fdea0562653 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 6 Dec 2010 16:48:31 +0100 Subject: Add ts_install_scb to suite/0 --- erts/emulator/test/bs_utf_SUITE.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'erts/emulator/test/bs_utf_SUITE.erl') diff --git a/erts/emulator/test/bs_utf_SUITE.erl b/erts/emulator/test/bs_utf_SUITE.erl index 0e61952916..14f246ee2c 100644 --- a/erts/emulator/test/bs_utf_SUITE.erl +++ b/erts/emulator/test/bs_utf_SUITE.erl @@ -19,7 +19,7 @@ -module(bs_utf_SUITE). --export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,fin_per_testcase/2, +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,fin_per_testcase/2, utf8_roundtrip/1,utf16_roundtrip/1,utf32_roundtrip/1, utf8_illegal_sequences/1,utf16_illegal_sequences/1, utf32_illegal_sequences/1, @@ -37,6 +37,8 @@ fin_per_testcase(_Func, Config) -> Dog = ?config(watchdog, Config), ?t:timetrap_cancel(Dog). +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> [utf8_roundtrip, utf16_roundtrip, utf32_roundtrip, utf8_illegal_sequences, utf16_illegal_sequences, -- cgit v1.2.3 From 8fd1f31f3074bc9444a0769418506b1ccc2041d3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 7 Dec 2010 11:35:13 +0100 Subject: Add init_per_suite and end_per_suite --- erts/emulator/test/bs_utf_SUITE.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'erts/emulator/test/bs_utf_SUITE.erl') diff --git a/erts/emulator/test/bs_utf_SUITE.erl b/erts/emulator/test/bs_utf_SUITE.erl index 14f246ee2c..a72afd0d7c 100644 --- a/erts/emulator/test/bs_utf_SUITE.erl +++ b/erts/emulator/test/bs_utf_SUITE.erl @@ -19,7 +19,7 @@ -module(bs_utf_SUITE). --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,fin_per_testcase/2, +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2,init_per_testcase/2,fin_per_testcase/2, utf8_roundtrip/1,utf16_roundtrip/1,utf32_roundtrip/1, utf8_illegal_sequences/1,utf16_illegal_sequences/1, utf32_illegal_sequences/1, @@ -47,6 +47,12 @@ all() -> groups() -> []. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. -- cgit v1.2.3 From d8a27daee264991e14def9b2e40f10c8f6d8e4d3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 14 Dec 2010 18:21:28 +0100 Subject: Fix formatting for emulator --- erts/emulator/test/bs_utf_SUITE.erl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'erts/emulator/test/bs_utf_SUITE.erl') diff --git a/erts/emulator/test/bs_utf_SUITE.erl b/erts/emulator/test/bs_utf_SUITE.erl index a72afd0d7c..6e660b12b0 100644 --- a/erts/emulator/test/bs_utf_SUITE.erl +++ b/erts/emulator/test/bs_utf_SUITE.erl @@ -19,7 +19,9 @@ -module(bs_utf_SUITE). --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2,init_per_testcase/2,fin_per_testcase/2, +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + init_per_testcase/2,end_per_testcase/2, utf8_roundtrip/1,utf16_roundtrip/1,utf32_roundtrip/1, utf8_illegal_sequences/1,utf16_illegal_sequences/1, utf32_illegal_sequences/1, @@ -33,16 +35,16 @@ init_per_testcase(Func, Config) when is_atom(Func), is_list(Config) -> Dog = ?t:timetrap(?t:minutes(6)), [{watchdog,Dog}|Config]. -fin_per_testcase(_Func, Config) -> +end_per_testcase(_Func, Config) -> Dog = ?config(watchdog, Config), ?t:timetrap_cancel(Dog). suite() -> [{suite_callbacks,[ts_install_scb]}]. all() -> -[utf8_roundtrip, utf16_roundtrip, utf32_roundtrip, - utf8_illegal_sequences, utf16_illegal_sequences, - utf32_illegal_sequences, bad_construction]. + [utf8_roundtrip, utf16_roundtrip, utf32_roundtrip, + utf8_illegal_sequences, utf16_illegal_sequences, + utf32_illegal_sequences, bad_construction]. groups() -> []. @@ -54,10 +56,10 @@ end_per_suite(_Config) -> ok. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. utf8_roundtrip(Config) when is_list(Config) -> -- cgit v1.2.3 From 308d6638450f5ffc7f432302367e84bcd92ea683 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 9 Feb 2011 19:10:44 +0100 Subject: Rename Suite Callback to Common Test Hook --- erts/emulator/test/bs_utf_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/test/bs_utf_SUITE.erl') diff --git a/erts/emulator/test/bs_utf_SUITE.erl b/erts/emulator/test/bs_utf_SUITE.erl index 6e660b12b0..626a8b4cb6 100644 --- a/erts/emulator/test/bs_utf_SUITE.erl +++ b/erts/emulator/test/bs_utf_SUITE.erl @@ -39,7 +39,7 @@ end_per_testcase(_Func, Config) -> Dog = ?config(watchdog, Config), ?t:timetrap_cancel(Dog). -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [utf8_roundtrip, utf16_roundtrip, utf32_roundtrip, -- cgit v1.2.3