test/test_roo.rb in roo-2.1.1 vs test/test_roo.rb in roo-2.2.0

- old
+ new

@@ -247,13 +247,13 @@ assert_equal "1:string",oo.cell(2, 1)+":"+oo.celltype(2, 1).to_s assert_equal "2:string",oo.cell(2, 2)+":"+oo.celltype(2, 2).to_s assert_equal "1:string",oo.cell(2, 3)+":"+oo.celltype(2, 3).to_s # Cells values in row 3: - assert_equal "1.0:float",oo.cell(3, 1).to_s+":"+oo.celltype(3, 1).to_s - assert_equal "3.0:float",oo.cell(3, 2).to_s+":"+oo.celltype(3, 2).to_s - assert_equal "1.0:float",oo.cell(3, 3).to_s+":"+oo.celltype(3, 3).to_s + assert_equal "1:float",oo.cell(3, 1).to_s+":"+oo.celltype(3, 1).to_s + assert_equal "3:float",oo.cell(3, 2).to_s+":"+oo.celltype(3, 2).to_s + assert_equal "1:float",oo.cell(3, 3).to_s+":"+oo.celltype(3, 3).to_s # Cells values in row 4: assert_equal "A:string",oo.cell(4, 1)+":"+oo.celltype(4, 1).to_s assert_equal "A:string",oo.cell(4, 2)+":"+oo.celltype(4, 2).to_s assert_equal "A:string",oo.cell(4, 3)+":"+oo.celltype(4, 3).to_s @@ -1159,12 +1159,18 @@ end def test_cell_boolean with_each_spreadsheet(:name=>'boolean', :format=>[:openoffice, :excelx]) do |oo| if oo.class == Roo::Excelx - assert_equal "TRUE", oo.cell(1,1), "failure in "+oo.class.to_s - assert_equal "FALSE", oo.cell(2,1), "failure in "+oo.class.to_s + assert_equal true, oo.cell(1, 1), "failure in #{oo.class}" + assert_equal false, oo.cell(2, 1), "failure in #{oo.class}" + + cell = oo.sheet_for(oo.default_sheet).cells[[1, 1,]] + assert_equal 'TRUE', cell.formatted_value + + cell = oo.sheet_for(oo.default_sheet).cells[[2, 1,]] + assert_equal 'FALSE', cell.formatted_value else assert_equal "true", oo.cell(1,1), "failure in "+oo.class.to_s assert_equal "false", oo.cell(2,1), "failure in "+oo.class.to_s end end @@ -1305,15 +1311,15 @@ assert_equal 11, oo.b4 # cell(4,'B') assert_equal 12, oo.c4 # cell(4,'C') assert_equal 13, oo.d4 # cell(4,'D') assert_equal 14, oo.e4 # cell(4,'E') assert_equal 'ABC', oo.c6('Sheet5') + assert_equal 41, oo.a12 - #assert_raises(ArgumentError) { - assert_raises(NoMethodError) { + assert_raises(NoMethodError) do # a42a is not a valid cell name, should raise ArgumentError assert_equal 9999, oo.a42a - } + end end end # compare large spreadsheets