From a419b44526678ee1cffdcd6faddc0a6fa0473899 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Tue, 27 Mar 2012 16:38:27 +0900 Subject: FAST ENOUGH? user system total real axlsx_noautowidth 1.560000 0.030000 1.590000 ( 1.717595) axlsx 4.360000 0.140000 4.500000 ( 5.748329) axlsx_shared 6.880000 0.160000 7.040000 ( 9.325648) axlsx_stream 4.320000 0.120000 4.440000 ( 5.642124) csv 0.240000 0.010000 0.250000 ( 0.301004) --- test/workbook/tc_shared_strings_table.rb | 2 +- test/workbook/worksheet/tc_cell.rb | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/workbook/tc_shared_strings_table.rb b/test/workbook/tc_shared_strings_table.rb index 259f5970..e3c9bf7b 100644 --- a/test/workbook/tc_shared_strings_table.rb +++ b/test/workbook/tc_shared_strings_table.rb @@ -26,7 +26,7 @@ class TestSharedStringsTable < Test::Unit::TestCase def test_valid_document schema = Nokogiri::XML::Schema(File.open(Axlsx::SML_XSD)) - doc = Nokogiri::XML(@p.workbook.shared_strings.to_xml) + doc = Nokogiri::XML(@p.workbook.shared_strings.to_xml_string) errors = [] schema.validate(doc).each do |error| puts error.message diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb index a5b0442f..991181e7 100644 --- a/test/workbook/worksheet/tc_cell.rb +++ b/test/workbook/worksheet/tc_cell.rb @@ -206,13 +206,14 @@ class TestCell < Test::Unit::TestCase end def test_equality - c2 = @row.add_cell 1, :type=>:float, :style=>1 - assert(c2.shareable(@c)) + c2 = @row.add_cell 1, :type=>:float, :style=>1 + + assert_equal(c2.shareable_hash,@c.shareable_hash) c3 = @row.add_cell 2, :type=>:float, :style=>1 c4 = @row.add_cell 1, :type=>:float, :style=>1, :color => "#FFFFFFFF" - assert_equal(c4.shareable(c2) ,false) + assert_equal(c4.shareable_hash == c2.shareable_hash,false) c5 = @row.add_cell 1, :type=>:float, :style=>1, :color => "#FFFFFFFF" - assert(c5.shareable(c4)) + assert_equal(c5.shareable_hash, c4.shareable_hash) end -- cgit v1.2.3