Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebolewski authored and JeffBezanson committed May 29, 2015
1 parent faa5263 commit 06f15bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions test/remote.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license

# Check that serializer hasn't gone out-of-frame
@test Serializer.ser_tag[Symbol] == 2
@test Serializer.ser_tag[()] == 47
@test Serializer.ser_tag[false] == 123
@test Serializer.sertag(Symbol) == 2
@test Serializer.sertag(()) == 47
@test Serializer.sertag(false) == 123

# issue #1770
let
Expand Down
12 changes: 6 additions & 6 deletions test/serialize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ end

# Tags
create_serialization_stream() do s
Serializer.writetag(s, Bool)
@test takebuf_array(s)[end] == UInt8(Serializer.ser_tag[Bool])
Serializer.writetag(s, Serializer.sertag(Bool))
@test takebuf_array(s)[end] == UInt8(Serializer.sertag(Bool))
end

create_serialization_stream() do s
Serializer.write_as_tag(s, Bool)
@test takebuf_array(s)[end] == UInt8(Serializer.ser_tag[Bool])
Serializer.write_as_tag(s, Serializer.sertag(Bool))
@test takebuf_array(s)[end] == UInt8(Serializer.sertag(Bool))
end

create_serialization_stream() do s
Serializer.write_as_tag(s, Symbol)
Serializer.write_as_tag(s, Serializer.sertag(Symbol))
data = takebuf_array(s)
@test data[end-1] == 0x00
@test data[end] == UInt8(Serializer.ser_tag[Symbol])
@test data[end] == UInt8(Serializer.sertag(Symbol))
end

# Boolean & Empty & Nothing
Expand Down

0 comments on commit 06f15bb

Please sign in to comment.