We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7bb267 commit 9b1efa3Copy full SHA for 9b1efa3
tests.cpp
@@ -401,6 +401,15 @@ it may produce wrong code or crash because of that.)"
401
<< std::endl;
402
}
403
404
+void testLongestCommonSubsequence() {
405
+ if (longest_common_subsequence_length("ABCD", "ACBAD") != 3) {
406
+ std::cerr << "Internal compiler error: The function calculating the "
407
+ "longest common subsequence of strings seems not to work!"
408
+ << std::endl;
409
+ std::exit(1);
410
+ }
411
+}
412
+
413
void runTests() {
414
tokenizerTests();
415
simpleParserTests();
@@ -411,4 +420,5 @@ void runTests() {
420
testTypeChecking();
421
testBitManipulations();
422
testMaps();
423
+ testLongestCommonSubsequence();
424
0 commit comments