From dc1e683111376624644a9a60df86cb341f7a554d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 10 Mar 2010 07:14:46 +0100 Subject: asn1 tests: Don't refer to $ERL_TOP in compiler options On Windows, $ERL_TOP contains a cygwin-style pathname that can be used in Makefiles to (for instance) include other Makefiles, but must not be passed to non-cygwin programs such as "erlc". Therefore, using compiler options such as "-I $(ERL_TOP)/lib/test_server/include" will not work on Windows. Fix this problem by include "test_server.hrl" using -include_lib() instead of -include(). That works because -include_lib() searches for include files in the code path without the need for any -I options. --- lib/asn1/test/testINSTANCE_OF.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/asn1/test/testINSTANCE_OF.erl') diff --git a/lib/asn1/test/testINSTANCE_OF.erl b/lib/asn1/test/testINSTANCE_OF.erl index 2a3a5c333b..0e2a704934 100644 --- a/lib/asn1/test/testINSTANCE_OF.erl +++ b/lib/asn1/test/testINSTANCE_OF.erl @@ -21,7 +21,7 @@ -export([compile/3,main/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). compile(Config,Rules,Opt) -> -- cgit v1.2.3 From 44cc5dfcbea91ef419c55a70c67c87b3a44e7a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 10 Mar 2010 07:32:19 +0100 Subject: asn1 tests: Modernize guard tests --- lib/asn1/test/testINSTANCE_OF.erl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/asn1/test/testINSTANCE_OF.erl') diff --git a/lib/asn1/test/testINSTANCE_OF.erl b/lib/asn1/test/testINSTANCE_OF.erl index 0e2a704934..9f8a871a63 100644 --- a/lib/asn1/test/testINSTANCE_OF.erl +++ b/lib/asn1/test/testINSTANCE_OF.erl @@ -73,17 +73,17 @@ test_encdec(_Erule,{lastName,{'GeneralName_lastName',{2,3,4}, test_encdec(Erule,Res) -> {error,{Erule,Res}}. -wrap(ber,Int) when list(Int) -> +wrap(ber,Int) when is_list(Int) -> binary_to_list(list_to_binary(Int)); -wrap(per,Int) when list(Int) -> +wrap(per,Int) when is_list(Int) -> binary_to_list(list_to_binary(Int)); -wrap(ber_bin,Int) when list(Int) -> +wrap(ber_bin,Int) when is_list(Int) -> list_to_binary(Int); -wrap(ber_bin_v2,Int) when list(Int) -> +wrap(ber_bin_v2,Int) when is_list(Int) -> list_to_binary(Int); -wrap(per_bin,Int) when list(Int) -> +wrap(per_bin,Int) when is_list(Int) -> list_to_binary(Int); -wrap(uper_bin,Int) when list(Int) -> +wrap(uper_bin,Int) when is_list(Int) -> list_to_binary(Int); wrap(_,Int) -> Int. -- cgit v1.2.3