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/testTimer.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/asn1/test/testTimer.erl') diff --git a/lib/asn1/test/testTimer.erl b/lib/asn1/test/testTimer.erl index 0fade7ebca..eac294c73c 100644 --- a/lib/asn1/test/testTimer.erl +++ b/lib/asn1/test/testTimer.erl @@ -22,7 +22,7 @@ -compile(export_all). %%-export([Function/Arity, ...]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -define(times, 5000). -- 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/testTimer.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/asn1/test/testTimer.erl') diff --git a/lib/asn1/test/testTimer.erl b/lib/asn1/test/testTimer.erl index eac294c73c..004bfbf0b0 100644 --- a/lib/asn1/test/testTimer.erl +++ b/lib/asn1/test/testTimer.erl @@ -146,7 +146,7 @@ go(Config,Enc) -> Bytes = case Enc of ber_bin -> list_to_binary(B); - per_bin when list(B) -> + per_bin when is_list(B) -> list_to_binary(B); per_bin -> B; @@ -179,7 +179,7 @@ encode(0, _Module,_Type,_Value) -> encode(N, Module,Type,Value) -> ?line {ok,B} = asn1rt:encode(Module,Type,Value), _B2 = if - list(B) -> list_to_binary(B); + is_list(B) -> list_to_binary(B); true -> B end, encode(N-1, Module,Type,Value). -- cgit v1.2.3