Skip to content

Commit 998bfa3

Browse files
authored
Merge pull request #61 from JuliaInterop/tk/rm-compat
remove uses of Compat from tests
2 parents a32597c + ac035d0 commit 998bfa3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/runtests.jl

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Base.Test
22
using JavaCall
3-
using Compat
43

54

65
versioninfo();
@@ -22,8 +21,8 @@ T = @jimport Test
2221
@test typemax(jint) == jcall(T, "testInt", jint, (jint,), typemax(jint))
2322
@test typemax(jlong) == jcall(T, "testLong", jlong, (jlong,), typemax(jlong))
2423
@test "Hello Java"==jcall(T, "testString", JString, (JString,), "Hello Java")
25-
@test @compat Float64(10.02) == jcall(T, "testDouble", jdouble, (jdouble,), 10.02) #Comparing exact float representations hence ==
26-
@test @compat Float32(10.02) == jcall(T, "testFloat", jfloat, (jfloat,), 10.02)
24+
@test Float64(10.02) == jcall(T, "testDouble", jdouble, (jdouble,), 10.02) #Comparing exact float representations hence ==
25+
@test Float32(10.02) == jcall(T, "testFloat", jfloat, (jfloat,), 10.02)
2726
@test realmax(jdouble) == jcall(T, "testDouble", jdouble, (jdouble,), realmax(jdouble))
2827
@test realmax(jfloat) == jcall(T, "testFloat", jfloat, (jfloat,), realmax(jfloat))
2928

@@ -62,9 +61,9 @@ j_u_arrays = @jimport java.util.Arrays
6261

6362
a=jcall(j_u_arrays, "copyOf", Array{jint, 1}, (Array{jint, 1}, jint), [1,2,3], 3)
6463
@test typeof(a) == Array{jint, 1}
65-
@test a[1] == @compat Int32(1)
66-
@test a[2] == @compat Int32(2)
67-
@test a[3] == @compat Int32(3)
64+
@test a[1] == Int32(1)
65+
@test a[2] == Int32(2)
66+
@test a[3] == Int32(3)
6867

6968
a=jcall(j_u_arrays, "copyOf", Array{JObject, 1}, (Array{JObject, 1}, jint), ["a","b","c"], 3)
7069
@test 3==length(a)
@@ -91,7 +90,7 @@ Dates.year(convert(Dates.DateTime, nullcal)) == 1970
9190

9291
JHashMap = @jimport(java.util.HashMap)
9392
p = JHashMap(())
94-
a=@compat Dict("a"=>"A", "b"=>"B")
93+
a= Dict("a"=>"A", "b"=>"B")
9594
b=convert(@jimport(java.util.Map), JString, JString, a)
9695
@assert jcall(b, "size", jint, ()) == 2
9796

@@ -153,7 +152,7 @@ for i=1:100; @test jcall(ta_20[i], "size", jint, ()) == 0; end
153152
# Test array conversions
154153
jobj = jcall(T, "testArrayAsObject", JObject, ())
155154
arr = convert(Array{Array{UInt8, 1}, 1}, jobj)
156-
@test ["Hello", "World"] == map(Compat.String, arr)
155+
@test ["Hello", "World"] == map(String, arr)
157156

158157
#Test iterator conversions
159158

0 commit comments

Comments
 (0)