Add CBOR simple value encoding tests (Bool or Nil).
parent
132368c4f1
commit
b0ed7aa477
|
@ -0,0 +1,15 @@
|
|||
require "./spec_helper"
|
||||
|
||||
describe CBOR do
|
||||
describe "basics: to_cbor" do
|
||||
it "union (Nil | Bool) (nil)" do
|
||||
value = (Nil | Bool).from_cbor(nil.to_cbor).to_cbor
|
||||
value.hexstring.should eq "f6"
|
||||
end
|
||||
it "union (Nil | Bool) (false)" do
|
||||
value = (Nil | Bool).from_cbor(false.to_cbor).to_cbor
|
||||
value.hexstring.should eq "f4"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue