Skip to content

Commit

Permalink
FastIOBuffers lower bound, add test for #56.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoolen committed Nov 19, 2018
1 parent 3d8987e commit c1c23d7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ BinDeps 0.8
@osx Homebrew 0.3.0
CMakeWrapper 0.2
StaticArrays 0.5
FastIOBuffers 0.0.1
FastIOBuffers 0.2.0
UnsafeArrays 0.2.0
22 changes: 22 additions & 0 deletions test/test_lcmtype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,25 @@ end
@test d === lcmt2.d
@test f === lcmt2.f
end

@testset "LCMType: handle" begin
channel = "CHANNEL_1"
msg = rand(lcm_test_type_1)

# start listening
sublcm = LCM()
check_msg = let expected = msg
(channel, msg) -> @test(msg == expected)
end
sub = subscribe(sublcm, channel, check_msg, lcm_test_type_1)
set_queue_capacity(sub, 2)

# publish two messages
publcm = LCM()
for _ = 1 : 2
publish(publcm, channel, msg)
end

# handle
LCMCore.lcm_handle(sublcm)
end

0 comments on commit c1c23d7

Please sign in to comment.