From 5b3735adc7cc7192e8a60d8138f6da87ed931691 Mon Sep 17 00:00:00 2001 From: Ben Arthur Date: Tue, 25 Oct 2016 11:40:48 -0400 Subject: [PATCH] added continuous sampling to tests --- test/runtests.jl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index cfc9681..4922323 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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 @@ -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 @@ -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 @@ -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