Skip to content

Commit

Permalink
added continuous sampling to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur committed Nov 1, 2016
1 parent 6dbe0eb commit 5b3735a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ else
@test start(t) == nothing
@test length(read(t, UInt32, 6)) == 12
@test stop(t) == nothing
@test NIDAQ.CfgSampClkTiming(t.th, convert(Ref{UInt8},b""), 100.0, NIDAQ.Val_Rising,
NIDAQ.Val_FiniteSamps, UInt64(10)) == 0
@test start(t) == nothing
@test length(read(t, Float64)) == 20
@test stop(t) == nothing
@test clear(t) == nothing
end
end
Expand All @@ -61,6 +66,12 @@ else
@test start(t) == nothing
@test write(t, rand(UInt32,6,2)) == 6
@test stop(t) == nothing
@test NIDAQ.CfgSampClkTiming(t.th, convert(Ref{UInt8},b""), 100.0, NIDAQ.Val_Rising,
NIDAQ.Val_FiniteSamps, UInt64(10)) == 0
@test write(t, rand(UInt32,10,2)) == 10
@test start(t) == nothing
@test NIDAQ.WaitUntilTaskDone(t.th,10.0) == 0
@test stop(t) == nothing
@test clear(t) == nothing
end
end
Expand All @@ -79,6 +90,11 @@ else
@test start(t) == nothing
@test length(read(t, UInt8, 6)) == 12
@test stop(t) == nothing
@test NIDAQ.CfgSampClkTiming(t.th, convert(Ref{UInt8},b""), 100.0, NIDAQ.Val_Rising,
NIDAQ.Val_FiniteSamps, UInt64(10)) == 0
@test start(t) == nothing
@test length(read(t, UInt32)) == 20
@test stop(t) == nothing
@test clear(t) == nothing
end
end
Expand All @@ -96,6 +112,12 @@ else
@test start(t) == nothing
@test write(t, round(UInt8, [1 0; 0 0; 1 0; 0 1; 1 1; 0 1])) == 6
@test stop(t) == nothing
@test NIDAQ.CfgSampClkTiming(t.th, convert(Ref{UInt8},b""), 100.0, NIDAQ.Val_Rising,
NIDAQ.Val_FiniteSamps, UInt64(10)) == 0
@test write(t, rand(UInt32,10,2)) == 10
@test start(t) == nothing
@test NIDAQ.WaitUntilTaskDone(t.th,10.0) == 0
@test stop(t) == nothing
@test clear(t) == nothing
end
end
Expand Down

0 comments on commit 5b3735a

Please sign in to comment.