@@ -4,29 +4,29 @@ using Test
4
4
import MathLink: WExpr, WSymbol
5
5
6
6
7
- @testset " W2Julia " begin
7
+ @testset " W2JuliaStruct " begin
8
8
# ##Test of a simple MathLink to Julia converter. It converts MathLink expressions to the correcsponding Julia constructions
9
9
@testset " Lists to Lists" begin
10
- @test W2Julia (W ` {1,2,3}` ) == [1 ,2 ,3 ]
11
- @test W2Julia ([1 ,2 ,3 ]) == [1 ,2 ,3 ]
12
- @test W2Julia ([1 ,2.2 ,3 ]) == [1 ,2.2 ,3 ]
13
- @test W2Julia (W ` {1,a,3}` ) == [1 ,W " a" ,3 ]
14
- @test W2Julia (W ` {1,a,{1,2}}` ) == [1 ,W " a" ,[1 ,2 ]]
15
- @test W2Julia ([.1 ,W ` {1,a,3}` ]) == [.1 ,[1 ,W " a" ,3 ]]
10
+ @test W2JuliaStruct (W ` {1,2,3}` ) == [1 ,2 ,3 ]
11
+ @test W2JuliaStruct ([1 ,2 ,3 ]) == [1 ,2 ,3 ]
12
+ @test W2JuliaStruct ([1 ,2.2 ,3 ]) == [1 ,2.2 ,3 ]
13
+ @test W2JuliaStruct (W ` {1,a,3}` ) == [1 ,W " a" ,3 ]
14
+ @test W2JuliaStruct (W ` {1,a,{1,2}}` ) == [1 ,W " a" ,[1 ,2 ]]
15
+ @test W2JuliaStruct ([.1 ,W ` {1,a,3}` ]) == [.1 ,[1 ,W " a" ,3 ]]
16
16
17
17
end
18
18
@testset " Association to Dict" begin
19
- @test W2Julia (Dict ( 1 => " A" , " B" => 2 )) == Dict ( 1 => " A" , " B" => 2 )
19
+ @test W2JuliaStruct (Dict ( 1 => " A" , " B" => 2 )) == Dict ( 1 => " A" , " B" => 2 )
20
20
21
- @test W2Julia (W ` Association["A" -> "B", "C" -> "D"]` ) == Dict ( " A" => " B" , " C" => " D" )
21
+ @test W2JuliaStruct (W ` Association["A" -> "B", "C" -> "D"]` ) == Dict ( " A" => " B" , " C" => " D" )
22
22
end
23
23
@testset " Association and List Dict" begin
24
- @test W2Julia (W ` Association["A" -> {1,2,3}, "B" -> "C"]` ) == Dict ( " A" => [1 ,2 ,3 ] , " B" => " C" )
24
+ @test W2JuliaStruct (W ` Association["A" -> {1,2,3}, "B" -> "C"]` ) == Dict ( " A" => [1 ,2 ,3 ] , " B" => " C" )
25
25
26
- @test W2Julia (W ` Association["A" -> {1,a,3}, "B" -> "C"]` ) == Dict ( " A" => [1 ,W " a" ,3 ] , " B" => " C" )
26
+ @test W2JuliaStruct (W ` Association["A" -> {1,a,3}, "B" -> "C"]` ) == Dict ( " A" => [1 ,W " a" ,3 ] , " B" => " C" )
27
27
28
28
29
- @test W2Julia (W ` {1,Association["team" -> {1,2,3}, "lastName" -> "Ching"]}` ) == [1 ,Dict ( " team" => [1 ,2 ,3 ] , " lastName" => " Ching" )]
29
+ @test W2JuliaStruct (W ` {1,Association["team" -> {1,2,3}, "lastName" -> "Ching"]}` ) == [1 ,Dict ( " team" => [1 ,2 ,3 ] , " lastName" => " Ching" )]
30
30
31
31
end
32
32
0 commit comments