From aeda4bb2ae215a67f862edb36f52f50358258278 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 30 Sep 2009 16:07:42 -0700 Subject: moving boolean classes --- test/visitors/test_yast_builder.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/visitors/test_yast_builder.rb') diff --git a/test/visitors/test_yast_builder.rb b/test/visitors/test_yast_builder.rb index 9a074e1..9d2945b 100644 --- a/test/visitors/test_yast_builder.rb +++ b/test/visitors/test_yast_builder.rb @@ -14,12 +14,25 @@ module Psych assert_equal a.inspect, Psych.load(a.to_yaml).inspect end + def test_circular_map + a = {} + a[a] = a + assert_equal a.inspect, Psych.load(a.to_yaml).inspect + end + def test_scalar assert_round_trip 'foo' assert_round_trip ':foo' assert_round_trip '' end + def test_boolean + assert_round_trip true + assert_round_trip 'true' + assert_round_trip false + assert_round_trip 'false' + end + def test_binary string = [0, 123,22, 44, 9, 32, 34, 39].pack('C*') assert_equal string, Psych.load(string.to_yaml) -- cgit v1.2.3