Test for Hack heuristic

This commit is contained in:
Arfon Smith
2014-11-04 16:12:46 -06:00
parent 0946791434
commit 114fabd29a

View File

@@ -105,6 +105,12 @@ class TestHeuristcs < Test::Unit::TestCase
end
end
def test_hack_by_heuristics
languages = ["Hack", "PHP"]
results = Heuristics.disambiguate_hack(fixture("Hack/funs.php"), languages)
assert_equal Language["Hack"], results.first
end
def test_sc_supercollider_by_heuristics
languages = ["Scala", "SuperCollider"]
results = Heuristics.disambiguate_sc(fixture("SuperCollider/WarpPreset.sc"), languages)