From 4c0b0301957c987739fc62868296a02d0991ef1a Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Fri, 12 Apr 2019 18:44:09 +0200 Subject: [PATCH] Remove obsolete unit tests --- test/test_node.cpp | 94 ------ test/test_paths.cpp | 28 -- test/test_selector_difference.cpp | 25 -- test/test_specificity.cpp | 25 -- test/test_subset_map.cpp | 472 ------------------------------ test/test_superselector.cpp | 69 ----- test/test_unification.cpp | 31 -- 7 files changed, 744 deletions(-) delete mode 100644 test/test_node.cpp delete mode 100644 test/test_paths.cpp delete mode 100644 test/test_selector_difference.cpp delete mode 100644 test/test_specificity.cpp delete mode 100644 test/test_subset_map.cpp delete mode 100644 test/test_superselector.cpp delete mode 100644 test/test_unification.cpp diff --git a/test/test_node.cpp b/test/test_node.cpp deleted file mode 100644 index 905dc1899..000000000 --- a/test/test_node.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include -#include - -#include "node.hpp" -#include "parser.hpp" - - -#define STATIC_ARRAY_SIZE(array) (sizeof((array))/sizeof((array[0]))) - - -namespace Sass { - - Context ctx = Context::Data(); - - const char* const ROUNDTRIP_TESTS[] = { - NULL, - "~", - "CMPD", - "~ CMPD", - "CMPD >", - "> > CMPD", - "CMPD ~ ~", - "> + CMPD1.CMPD2 > ~", - "> + CMPD1.CMPD2 CMPD3.CMPD4 > ~", - "+ CMPD1 CMPD2 ~ CMPD3 + CMPD4 > CMPD5 > ~" - }; - - - - static Complex_Selector* createComplexSelector(std::string src) { - std::string temp(src); - temp += ";"; - return (*Parser::from_c_str(temp.c_str(), ctx, "", Position()).parse_selector_list())[0]; - } - - - void roundtripTest(const char* toTest) { - - // Create the initial selector - - Complex_Selector* pOrigSelector = NULL; - if (toTest) { - pOrigSelector = createComplexSelector(toTest); - } - - std::string expected(pOrigSelector ? pOrigSelector->to_string() : "NULL"); - - - // Roundtrip the selector into a node and back - - Node node = complexSelectorToNode(pOrigSelector, ctx); - - std::stringstream nodeStringStream; - nodeStringStream << node; - std::string nodeString = nodeStringStream.str(); - cout << "ASNODE: " << node << endl; - - Complex_Selector* pNewSelector = nodeToComplexSelector(node, ctx); - - // Show the result - - std::string result(pNewSelector ? pNewSelector->to_string() : "NULL"); - - cout << "SELECTOR: " << expected << endl; - cout << "NEW SELECTOR: " << result << endl; - - - // Test that they are equal using the equality operator - - assert( (!pOrigSelector && !pNewSelector ) || (pOrigSelector && pNewSelector) ); - if (pOrigSelector) { - assert( *pOrigSelector == *pNewSelector ); - } - - - // Test that they are equal by comparing the string versions of the selectors - - assert(expected == result); - - } - - - int main() { - for (int index = 0; index < STATIC_ARRAY_SIZE(ROUNDTRIP_TESTS); index++) { - const char* const toTest = ROUNDTRIP_TESTS[index]; - cout << "\nINPUT STRING: " << (toTest ? toTest : "NULL") << endl; - roundtripTest(toTest); - } - - cout << "\nTesting Done.\n"; - } - - -} diff --git a/test/test_paths.cpp b/test/test_paths.cpp deleted file mode 100644 index bfcf8ec6d..000000000 --- a/test/test_paths.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include "../paths.hpp" - -using namespace Sass; - -template -std::vector& operator<<(std::vector& v, const T& e) -{ - v.push_back(e); - return v; -} - -int main() -{ - std::vector v1, v2, v3; - v1 << 1 << 2; - v2 << 3; - v3 << 4 << 5 << 6; - - std::vector > ss; - ss << v1 << v2 << v3; - - std::vector > ps = paths(ss); - for (size_t i = 0, S = ps.size(); i < S; ++i) { - std::cout << vector_to_string(ps[i]) << std::endl; - } - return 0; -} diff --git a/test/test_selector_difference.cpp b/test/test_selector_difference.cpp deleted file mode 100644 index e2880c0b0..000000000 --- a/test/test_selector_difference.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "../ast.hpp" -#include "../context.hpp" -#include "../parser.hpp" -#include -#include - -using namespace Sass; - -Context ctx = Context::Data(); - -Compound_Selector* selector(std::string src) -{ return Parser::from_c_str(src.c_str(), ctx, "", Position()).parse_compound_selector(); } - -void diff(std::string s, std::string t) -{ - std::cout << s << " - " << t << " = " << selector(s + ";")->minus(selector(t + ";"), ctx)->to_string() << std::endl; -} - -int main() -{ - diff(".a.b.c", ".c.b"); - diff(".a.b.c", ".fludge.b"); - - return 0; -} diff --git a/test/test_specificity.cpp b/test/test_specificity.cpp deleted file mode 100644 index ba9bbfc46..000000000 --- a/test/test_specificity.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "../ast.hpp" -#include "../context.hpp" -#include "../parser.hpp" -#include -#include - -using namespace Sass; - -Context ctx = Context::Data(); - -Selector* selector(std::string src) -{ return Parser::from_c_str(src.c_str(), ctx, "", Position()).parse_selector_list(); } - -void spec(std::string sel) -{ std::cout << sel << "\t::\t" << selector(sel + ";")->specificity() << std::endl; } - -int main() -{ - spec("foo bar hux"); - spec(".foo .bar hux"); - spec("#foo .bar[hux='mux']"); - spec("a b c d e f"); - - return 0; -} diff --git a/test/test_subset_map.cpp b/test/test_subset_map.cpp deleted file mode 100644 index 37945143f..000000000 --- a/test/test_subset_map.cpp +++ /dev/null @@ -1,472 +0,0 @@ -#include -#include -#include -#include "../subset_map.hpp" - -Subset_Map ssm; - -string toString(std::vector v); -string toString(std::vector>> v); -void assertEqual(string std::sExpected, std::string sResult); - -void setup() { - ssm.clear(); - - //@ssm[Set[1, 2]] = "Foo" - std::vector s1; - s1.push_back("1"); - s1.push_back("2"); - ssm.put(s1, "Foo"); - - //@ssm[Set["fizz", "fazz"]] = "Bar" - std::vector s2; - s2.push_back("fizz"); - s2.push_back("fazz"); - ssm.put(s2, "Bar"); - - //@ssm[Set[:foo, :bar]] = "Baz" - std::vector s3; - s3.push_back(":foo"); - s3.push_back(":bar"); - ssm.put(s3, "Baz"); - - //@ssm[Set[:foo, :bar, :baz]] = "Bang" - std::vector s4; - s4.push_back(":foo"); - s4.push_back(":bar"); - s4.push_back(":baz"); - ssm.put(s4, "Bang"); - - //@ssm[Set[:bip, :bop, :blip]] = "Qux" - std::vector s5; - s5.push_back(":bip"); - s5.push_back(":bop"); - s5.push_back(":blip"); - ssm.put(s5, "Qux"); - - //@ssm[Set[:bip, :bop]] = "Thram" - std::vector s6; - s6.push_back(":bip"); - s6.push_back(":bop"); - ssm.put(s6, "Thram"); -} - -void testEqualKeys() { - std::cout << "testEqualKeys" << std::endl; - - //assert_equal [["Foo", Set[1, 2]]], @ssm.get(Set[1, 2]) - std::vector k1; - k1.push_back("1"); - k1.push_back("2"); - assertEqual("[[Foo, Set[1, 2]]]", toString(ssm.get_kv(k1))); - - //assert_equal [["Bar", Set["fizz", "fazz"]]], @ssm.get(Set["fizz", "fazz"]) - std::vector k2; - k2.push_back("fizz"); - k2.push_back("fazz"); - assertEqual("[[Bar, Set[fizz, fazz]]]", toString(ssm.get_kv(k2))); - - std::cout << std::endl; -} - -void testSubsetKeys() { - std::cout << "testSubsetKeys" << std::endl; - - //assert_equal [["Foo", Set[1, 2]]], @ssm.get(Set[1, 2, "fuzz"]) - std::vector k1; - k1.push_back("1"); - k1.push_back("2"); - k1.push_back("fuzz"); - assertEqual("[[Foo, Set[1, 2]]]", toString(ssm.get_kv(k1))); - - //assert_equal [["Bar", Set["fizz", "fazz"]]], @ssm.get(Set["fizz", "fazz", 3]) - std::vector k2; - k2.push_back("fizz"); - k2.push_back("fazz"); - k2.push_back("3"); - assertEqual("[[Bar, Set[fizz, fazz]]]", toString(ssm.get_kv(k2))); - - std::cout << std::endl; -} - -void testSupersetKeys() { - std::cout << "testSupersetKeys" << std::endl; - - //assert_equal [], @ssm.get(Set[1]) - std::vector k1; - k1.push_back("1"); - assertEqual("[]", toString(ssm.get_kv(k1))); - - //assert_equal [], @ssm.get(Set[2]) - std::vector k2; - k2.push_back("2"); - assertEqual("[]", toString(ssm.get_kv(k2))); - - //assert_equal [], @ssm.get(Set["fizz"]) - std::vector k3; - k3.push_back("fizz"); - assertEqual("[]", toString(ssm.get_kv(k3))); - - //assert_equal [], @ssm.get(Set["fazz"]) - std::vector k4; - k4.push_back("fazz"); - assertEqual("[]", toString(ssm.get_kv(k4))); - - std::cout << std::endl; -} - -void testDisjointKeys() { - std::cout << "testDisjointKeys" << std::endl; - - //assert_equal [], @ssm.get(Set[3, 4]) - std::vector k1; - k1.push_back("3"); - k1.push_back("4"); - assertEqual("[]", toString(ssm.get_kv(k1))); - - //assert_equal [], @ssm.get(Set["fuzz", "frizz"]) - std::vector k2; - k2.push_back("fuzz"); - k2.push_back("frizz"); - assertEqual("[]", toString(ssm.get_kv(k2))); - - //assert_equal [], @ssm.get(Set["gran", 15]) - std::vector k3; - k3.push_back("gran"); - k3.push_back("15"); - assertEqual("[]", toString(ssm.get_kv(k3))); - - std::cout << std::endl; -} - -void testSemiDisjointKeys() { - std::cout << "testSemiDisjointKeys" << std::endl; - - //assert_equal [], @ssm.get(Set[2, 3]) - std::vector k1; - k1.push_back("2"); - k1.push_back("3"); - assertEqual("[]", toString(ssm.get_kv(k1))); - - //assert_equal [], @ssm.get(Set["fizz", "fuzz"]) - std::vector k2; - k2.push_back("fizz"); - k2.push_back("fuzz"); - assertEqual("[]", toString(ssm.get_kv(k2))); - - //assert_equal [], @ssm.get(Set[1, "fazz"]) - std::vector k3; - k3.push_back("1"); - k3.push_back("fazz"); - assertEqual("[]", toString(ssm.get_kv(k3))); - - std::cout << std::endl; -} - -void testEmptyKeySet() { - std::cout << "testEmptyKeySet" << std::endl; - - //assert_raises(ArgumentError) {@ssm[Set[]] = "Fail"} - std::vector s1; - try { - ssm.put(s1, "Fail"); - } - catch (const char* &e) { - assertEqual("internal error: subset map keys may not be empty", e); - } -} - -void testEmptyKeyGet() { - std::cout << "testEmptyKeyGet" << std::endl; - - //assert_equal [], @ssm.get(Set[]) - std::vector k1; - assertEqual("[]", toString(ssm.get_kv(k1))); - - std::cout << std::endl; -} -void testMultipleSubsets() { - std::cout << "testMultipleSubsets" << std::endl; - - //assert_equal [["Foo", Set[1, 2]], ["Bar", Set["fizz", "fazz"]]], @ssm.get(Set[1, 2, "fizz", "fazz"]) - std::vector k1; - k1.push_back("1"); - k1.push_back("2"); - k1.push_back("fizz"); - k1.push_back("fazz"); - assertEqual("[[Foo, Set[1, 2]], [Bar, Set[fizz, fazz]]]", toString(ssm.get_kv(k1))); - - //assert_equal [["Foo", Set[1, 2]], ["Bar", Set["fizz", "fazz"]]], @ssm.get(Set[1, 2, 3, "fizz", "fazz", "fuzz"]) - std::vector k2; - k2.push_back("1"); - k2.push_back("2"); - k2.push_back("3"); - k2.push_back("fizz"); - k2.push_back("fazz"); - k2.push_back("fuzz"); - assertEqual("[[Foo, Set[1, 2]], [Bar, Set[fizz, fazz]]]", toString(ssm.get_kv(k2))); - - //assert_equal [["Baz", Set[:foo, :bar]]], @ssm.get(Set[:foo, :bar]) - std::vector k3; - k3.push_back(":foo"); - k3.push_back(":bar"); - assertEqual("[[Baz, Set[:foo, :bar]]]", toString(ssm.get_kv(k3))); - - //assert_equal [["Baz", Set[:foo, :bar]], ["Bang", Set[:foo, :bar, :baz]]], @ssm.get(Set[:foo, :bar, :baz]) - std::vector k4; - k4.push_back(":foo"); - k4.push_back(":bar"); - k4.push_back(":baz"); - assertEqual("[[Baz, Set[:foo, :bar]], [Bang, Set[:foo, :bar, :baz]]]", toString(ssm.get_kv(k4))); - - std::cout << std::endl; -} -void testBracketBracket() { - std::cout << "testBracketBracket" << std::endl; - - //assert_equal ["Foo"], @ssm[Set[1, 2, "fuzz"]] - std::vector k1; - k1.push_back("1"); - k1.push_back("2"); - k1.push_back("fuzz"); - assertEqual("[Foo]", toString(ssm.get_v(k1))); - - //assert_equal ["Baz", "Bang"], @ssm[Set[:foo, :bar, :baz]] - std::vector k2; - k2.push_back(":foo"); - k2.push_back(":bar"); - k2.push_back(":baz"); - assertEqual("[Baz, Bang]", toString(ssm.get_v(k2))); - - std::cout << std::endl; -} - -void testKeyOrder() { - std::cout << "testEqualKeys" << std::endl; - - //assert_equal [["Foo", Set[1, 2]]], @ssm.get(Set[2, 1]) - std::vector k1; - k1.push_back("2"); - k1.push_back("1"); - assertEqual("[[Foo, Set[1, 2]]]", toString(ssm.get_kv(k1))); - - std::cout << std::endl; -} - -void testOrderPreserved() { - std::cout << "testOrderPreserved" << std::endl; - //@ssm[Set[10, 11, 12]] = 1 - std::vector s1; - s1.push_back("10"); - s1.push_back("11"); - s1.push_back("12"); - ssm.put(s1, "1"); - - //@ssm[Set[10, 11]] = 2 - std::vector s2; - s2.push_back("10"); - s2.push_back("11"); - ssm.put(s2, "2"); - - //@ssm[Set[11]] = 3 - std::vector s3; - s3.push_back("11"); - ssm.put(s3, "3"); - - //@ssm[Set[11, 12]] = 4 - std::vector s4; - s4.push_back("11"); - s4.push_back("12"); - ssm.put(s4, "4"); - - //@ssm[Set[9, 10, 11, 12, 13]] = 5 - std::vector s5; - s5.push_back("9"); - s5.push_back("10"); - s5.push_back("11"); - s5.push_back("12"); - s5.push_back("13"); - ssm.put(s5, "5"); - - //@ssm[Set[10, 13]] = 6 - std::vector s6; - s6.push_back("10"); - s6.push_back("13"); - ssm.put(s6, "6"); - - //assert_equal([[1, Set[10, 11, 12]], [2, Set[10, 11]], [3, Set[11]], [4, Set[11, 12]], [5, Set[9, 10, 11, 12, 13]], [6, Set[10, 13]]], @ssm.get(Set[9, 10, 11, 12, 13])) - std::vector k1; - k1.push_back("9"); - k1.push_back("10"); - k1.push_back("11"); - k1.push_back("12"); - k1.push_back("13"); - assertEqual("[[1, Set[10, 11, 12]], [2, Set[10, 11]], [3, Set[11]], [4, Set[11, 12]], [5, Set[9, 10, 11, 12, 13]], [6, Set[10, 13]]]", toString(ssm.get_kv(k1))); - - std::cout << std::endl; -} -void testMultipleEqualValues() { - std::cout << "testMultipleEqualValues" << std::endl; - //@ssm[Set[11, 12]] = 1 - std::vector s1; - s1.push_back("11"); - s1.push_back("12"); - ssm.put(s1, "1"); - - //@ssm[Set[12, 13]] = 2 - std::vector s2; - s2.push_back("12"); - s2.push_back("13"); - ssm.put(s2, "2"); - - //@ssm[Set[13, 14]] = 1 - std::vector s3; - s3.push_back("13"); - s3.push_back("14"); - ssm.put(s3, "1"); - - //@ssm[Set[14, 15]] = 1 - std::vector s4; - s4.push_back("14"); - s4.push_back("15"); - ssm.put(s4, "1"); - - //assert_equal([[1, Set[11, 12]], [2, Set[12, 13]], [1, Set[13, 14]], [1, Set[14, 15]]], @ssm.get(Set[11, 12, 13, 14, 15])) - std::vector k1; - k1.push_back("11"); - k1.push_back("12"); - k1.push_back("13"); - k1.push_back("14"); - k1.push_back("15"); - assertEqual("[[1, Set[11, 12]], [2, Set[12, 13]], [1, Set[13, 14]], [1, Set[14, 15]]]", toString(ssm.get_kv(k1))); - - std::cout << std::endl; -} - -int main() -{ - std::vector s1; - s1.push_back("1"); - s1.push_back("2"); - - std::vector s2; - s2.push_back("2"); - s2.push_back("3"); - - std::vector s3; - s3.push_back("3"); - s3.push_back("4"); - - ssm.put(s1, "value1"); - ssm.put(s2, "value2"); - ssm.put(s3, "value3"); - - std::vector s4; - s4.push_back("1"); - s4.push_back("2"); - s4.push_back("3"); - - std::vector > > fetched(ssm.get_kv(s4)); - - std::cout << "PRINTING RESULTS:" << std::endl; - for (size_t i = 0, S = fetched.size(); i < S; ++i) { - std::cout << fetched[i].first << std::endl; - } - - Subset_Map ssm2; - ssm2.put(s1, "foo"); - ssm2.put(s2, "bar"); - ssm2.put(s4, "hux"); - - std::vector > > fetched2(ssm2.get_kv(s4)); - - std::cout << std::endl << "PRINTING RESULTS:" << std::endl; - for (size_t i = 0, S = fetched2.size(); i < S; ++i) { - std::cout << fetched2[i].first << std::endl; - } - - std::cout << "TRYING ON A SELECTOR-LIKE OBJECT" << std::endl; - - Subset_Map sel_ssm; - std::vector target; - target.push_back("desk"); - target.push_back(".wood"); - - std::vector actual; - actual.push_back("desk"); - actual.push_back(".wood"); - actual.push_back(".mine"); - - sel_ssm.put(target, "has-aquarium"); - std::vector > > fetched3(sel_ssm.get_kv(actual)); - std::cout << "RESULTS:" << std::endl; - for (size_t i = 0, S = fetched3.size(); i < S; ++i) { - std::cout << fetched3[i].first << std::endl; - } - - std::cout << std::endl; - - // BEGIN PORTED RUBY TESTS FROM /test/sass/util/subset_map_test.rb - - setup(); - testEqualKeys(); - testSubsetKeys(); - testSupersetKeys(); - testDisjointKeys(); - testSemiDisjointKeys(); - testEmptyKeySet(); - testEmptyKeyGet(); - testMultipleSubsets(); - testBracketBracket(); - testKeyOrder(); - - setup(); - testOrderPreserved(); - - setup(); - testMultipleEqualValues(); - - return 0; -} - -string toString(std::vector>> v) -{ - std::stringstream buffer; - buffer << "["; - for (size_t i = 0, S = v.size(); i < S; ++i) { - buffer << "[" << v[i].first; - buffer << ", Set["; - for (size_t j = 0, S = v[i].second.size(); j < S; ++j) { - buffer << v[i].second[j]; - if (j < S-1) { - buffer << ", "; - } - } - buffer << "]]"; - if (i < S-1) { - buffer << ", "; - } - } - buffer << "]"; - return buffer.str(); -} - -string toString(std::vector v) -{ - std::stringstream buffer; - buffer << "["; - for (size_t i = 0, S = v.size(); i < S; ++i) { - buffer << v[i]; - if (i < S-1) { - buffer << ", "; - } - } - buffer << "]"; - return buffer.str(); -} - -void assertEqual(string sExpected, string sResult) { - std::cout << "Expected: " << sExpected << std::endl; - std::cout << "Result: " << sResult << std::endl; - assert(sExpected == sResult); -} diff --git a/test/test_superselector.cpp b/test/test_superselector.cpp deleted file mode 100644 index bf21c7c4d..000000000 --- a/test/test_superselector.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "../ast.hpp" -#include "../context.hpp" -#include "../parser.hpp" -#include - -using namespace Sass; - -Context ctx = Context(Context::Data()); - -Compound_Selector* compound_selector(std::string src) -{ return Parser::from_c_str(src.c_str(), ctx, "", Position()).parse_compound_selector(); } - -Complex_Selector* complex_selector(std::string src) -{ return Parser::from_c_str(src.c_str(), ctx, "", Position()).parse_complex_selector(false); } - -void check_compound(std::string s1, std::string s2) -{ - std::cout << "Is " - << s1 - << " a superselector of " - << s2 - << "?\t" - << compound_selector(s1 + ";")->is_superselector_of(compound_selector(s2 + ";")) - << std::endl; -} - -void check_complex(std::string s1, std::string s2) -{ - std::cout << "Is " - << s1 - << " a superselector of " - << s2 - << "?\t" - << complex_selector(s1 + ";")->is_superselector_of(complex_selector(s2 + ";")) - << std::endl; -} - -int main() -{ - check_compound(".foo", ".foo.bar"); - check_compound(".foo.bar", ".foo"); - check_compound(".foo.bar", "div.foo"); - check_compound(".foo", "div.foo"); - check_compound("div.foo", ".foo"); - check_compound("div.foo", "div.bar.foo"); - check_compound("p.foo", "div.bar.foo"); - check_compound(".hux", ".mumble"); - - std::cout << std::endl; - - check_complex(".foo ~ .bar", ".foo + .bar"); - check_complex(".foo .bar", ".foo + .bar"); - check_complex(".foo .bar", ".foo > .bar"); - check_complex(".foo .bar > .hux", ".foo.a .bar.b > .hux"); - check_complex(".foo ~ .bar .hux", ".foo.a + .bar.b > .hux"); - check_complex(".foo", ".bar .foo"); - check_complex(".foo", ".foo.a"); - check_complex(".foo.bar", ".foo"); - check_complex(".foo .bar .hux", ".bar .hux"); - check_complex(".foo ~ .bar .hux.x", ".foo.a + .bar.b > .hux.y"); - check_complex(".foo ~ .bar .hux", ".foo.a + .bar.b > .mumble"); - check_complex(".foo + .bar", ".foo ~ .bar"); - check_complex("a c e", "a b c d e"); - check_complex("c a e", "a b c d e"); - - return 0; -} - - diff --git a/test/test_unification.cpp b/test/test_unification.cpp deleted file mode 100644 index 5c663ee90..000000000 --- a/test/test_unification.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "../ast.hpp" -#include "../context.hpp" -#include "../parser.hpp" -#include - -using namespace Sass; - -Context ctx = Context(Context::Data()); - -Compound_Selector* selector(std::string src) -{ return Parser::from_c_str(src.c_str(), ctx, "", Position()).parse_compound_selector(); } - -void unify(std::string lhs, std::string rhs) -{ - Compound_Selector* unified = selector(lhs + ";")->unify_with(selector(rhs + ";"), ctx); - std::cout << lhs << " UNIFIED WITH " << rhs << " =\t" << (unified ? unified->to_string() : "NOTHING") << std::endl; -} - -int main() -{ - unify(".foo", ".foo.bar"); - unify("div:nth-of-type(odd)", "div:first-child"); - unify("div", "span:whatever"); - unify("div", "span"); - unify("foo:bar::after", "foo:bar::first-letter"); - unify(".foo#bar.hux", ".hux.foo#bar"); - unify(".foo#bar.hux", ".hux.foo#baz"); - unify("*:blah:fudge", "p:fudge:blah"); - - return 0; -}