Skip to content

Commit

Permalink
model: fix test cases macro (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin committed Dec 2, 2017
1 parent 914fab6 commit c43d0dd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/unittest/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ function test_feedforward()
info("Model::FeedForward::constructor")
let x = @mx.var x
m = mx.FeedForward(x)
@assert m.arch === x
@assert length(m.ctx) == 1
@test m.arch === x
@test length(m.ctx) == 1
end

info("Model::FeedForward::constructor::keyword context")
let x = @mx.var x
m = mx.FeedForward(x, context = mx.cpu())
@assert m.arch === x
@assert length(m.ctx) == 1
@test m.arch === x
@test length(m.ctx) == 1
end

let x = @mx.var x
m = mx.FeedForward(x, context = [mx.cpu(), mx.cpu(1)])
@assert m.arch === x
@assert length(m.ctx) == 2
@test m.arch === x
@test length(m.ctx) == 2
end
end

Expand Down

0 comments on commit c43d0dd

Please sign in to comment.