spec/code/parser/number_spec.rb in template-ruby-0.1.0 vs spec/code/parser/number_spec.rb in template-ruby-0.2.0

- old
+ new

@@ -13,55 +13,55 @@ number: { base_10: { decimal: { sign: "-", whole: "1", - decimal: "0" - } - } - } - } + decimal: "0", + }, + }, + }, + }, ], [ "+1.0", { number: { base_10: { decimal: { sign: "+", whole: "1", - decimal: "0" - } - } - } - } + decimal: "0", + }, + }, + }, + }, ], ["0", { number: { base_10: { integer: { whole: "0" } } } }], ["+0", { number: { base_10: { integer: { sign: "+", whole: "0" } } } }], ["-0", { number: { base_10: { integer: { sign: "-", whole: "0" } } } }], ["0b010", { number: { base_2: "010" } }], ["0o01234567", { number: { base_8: "01234567" } }], [ "0x0123456789aAbBcCdDeEfF", - { number: { base_16: "0123456789aAbBcCdDeEfF" } } + { number: { base_16: "0123456789aAbBcCdDeEfF" } }, ], [ "10e20", { number: { base_10: { integer: { whole: "10", exponent: { integer: { - whole: "20" - } - } - } - } - } - } + whole: "20", + }, + }, + }, + }, + }, + }, ], [ "10.34e23.45", { number: { @@ -70,17 +70,17 @@ whole: "10", decimal: "34", exponent: { decimal: { whole: "23", - decimal: "45" - } - } - } - } - } - } + decimal: "45", + }, + }, + }, + }, + }, + }, ], [ "+10e-20e1.0", { number: { @@ -93,19 +93,19 @@ sign: "-", whole: "20", exponent: { decimal: { whole: "1", - decimal: "0" - } - } - } - } - } - } - } - } - ] + decimal: "0", + }, + }, + }, + }, + }, + }, + }, + }, + ], ].each do |(input, expected)| context input.inspect do let(:input) { input } it "succeeds" do