Skip to content

Commit

Permalink
Merge pull request #19 from yomichi/master
Browse files Browse the repository at this point in the history
fixed test_bcast.jl
  • Loading branch information
lcw committed Sep 30, 2014
2 parents 9ddf8e8 + 1a87b0e commit f07e962
Showing 1 changed file with 7 additions and 49 deletions.
56 changes: 7 additions & 49 deletions test/test_bcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,18 @@ root = 0

srand(17)

# Float64
A = rand(13)
@test bcast_array(A, root) == A
#@testfails bcast_array(A, root) == rand(13)

# Complex128
A = rand(13) + im * rand(13)
@test bcast_array(A, root) == A

# Float32
A = float32(rand(15))
@test bcast_array(A, root) == A

# Complex64
A = float32(rand(15)) + im * float32(rand(15))
@test bcast_array(A, root) == A
matsize = (17,17)
for typ in ( Float32, Float64, Complex64, Complex128,
Int8, Int16, Int32, Int64,
Uint8, Uint16, Uint32, Uint64)
A = rand(typ, matsize...)
@test bcast_array(A, root) == A
end

# Char
A = ['s', 't', 'a', 'r', ' ', 'w', 'a', 'r', 's']
@test bcast_array(A, root) == A

# Int8
A = int8(rand(1:143, 34))
@test bcast_array(A, root) == A

# Uint8
A = uint8(rand(34, 123))
@test bcast_array(A, root) == A

# Int16
A = int16(rand(1430, 340))
@test bcast_array(A, root) == A

# Uint16
A = uint16(rand(340, 1230))
@test bcast_array(A, root) == A

# Int32
A = rand(34,123)
@test bcast_array(A, root) == A

# Uint32
A = uint32(rand(34, 28))
@test bcast_array(A, root) == A

# Int64
A = int64(rand(1:400, 33))
@test bcast_array(A, root) == A

# Uint64
A = uint64(rand(1:8000, 128))
@test bcast_array(A, root) == A


comm = MPI.COMM_WORLD

g = x -> x^2 + 2x - 1
Expand Down

0 comments on commit f07e962

Please sign in to comment.