A C++ shibboleth?

This commit is contained in:
Arfon Smith
2013-12-20 22:28:25 -06:00
parent 715680bc36
commit b2a5c30a44
4 changed files with 75 additions and 10 deletions

View File

@@ -27,6 +27,12 @@ class TestHeuristcs < Test::Unit::TestCase
assert_equal Language["Objective-C"], results.first
end
end
def test_cpp_by_heuristics
languages = ["C++", "Objective-C"]
results = Heuristics.find_by_heuristics(fixture("C++/render_adapter.cpp"), languages)
assert_equal Language["C++"], results.first
end
def test_detect_still_works_if_nothing_matches
match = Language.detect("Hello.m", fixture("Objective-C/hello.m"))