additional test coverage to document "shallow match"

This commit is contained in:
Fischlurch 2015-10-31 03:12:49 +01:00
parent 614e1f81e5
commit 1aac072224

View file

@ -904,6 +904,17 @@ namespace test{
// string match is literal
CHECK (!nz1.matches(" "));
CHECK (!nz2.matches(""));
GenNode copy(ni1);
CHECK (copy == ni1);
copy.data = 2*i1;
CHECK (copy != ni1);
CHECK (copy.idi == ni1.idi);
CHECK (not copy.data.matchData(ni1.data));
// NOTE: "match" operation is shallow on records
CHECK (copy.matches(ni1)); CHECK (ni1.matches(copy));
}
};