Commits

Anonymous committed c02234c

Refactored the 03simple_compare.t test file.

Comments (0)

Files changed (1)

perl/modules/XML-SemanaticDiff/t/03simple_compare.t

-use Test;
-BEGIN { plan tests => 2 }
+use strict;
+use warnings;
+
+use Test::More tests => 2;
 
 use XML::SemanticDiff;
 
-$xml1 = <<'EOX';      
+my $xml1 = <<'EOX';      
 <?xml version="1.0"?>
 <root>
 <el1 el1attr="good"/>
 </root>
 EOX
 
-$xml2 = <<'EOX';      
+my $xml2 = <<'EOX';      
 <?xml version="1.0"?>
 <root>
 <el1 el1attr="bad"/>
 
 my @results = $diff->compare($xml1, $xml2);
 
-ok(@results == 6);
+# TEST
+is (scalar(@results), 6, 
+    "Number of results in comparing two different XML texts"
+);
 
 @results = $diff->compare($xml1, $xml1);
 
-ok(@results == 0);
+# TEST
+ok ((!@results), "Identical XMLs generate identical results");
+