Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132938 views
License: OTHER
1
import levenshtein.Levenshtein;
2
3
import org.junit.Test;
4
import org.junit.runner.JUnitCore;
5
import static org.junit.Assert.assertEquals;
6
7
public class LevenshteinCompilationTest {
8
9
public LevenshteinCompilationTest() {
10
}
11
12
@Test(timeout = 10000)
13
public void runTest() {
14
Levenshtein levenshtein = new Levenshtein("nämlich", "dämlich");
15
assertEquals("Incorrect result comparing nämlich and dämlich", 1, levenshtein.getDistance());
16
}
17
18
public static void main(String[] args) throws Exception {
19
JUnitCore.main(LevenshteinCompilationTest.class.getName());
20
}
21
}
22
23