diff --git a/REQUIRE b/REQUIRE index 01002b1..14b1d8e 100644 --- a/REQUIRE +++ b/REQUIRE @@ -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 diff --git a/test/test_lcmtype.jl b/test/test_lcmtype.jl index 292e4bb..c8d0802 100644 --- a/test/test_lcmtype.jl +++ b/test/test_lcmtype.jl @@ -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