Click here to Skip to main content
15,868,141 members
Articles / Programming Languages / C++

Error Detection Based on Check Digit Schemes

Rate me:
Please Sign up or sign in to vote.
4.72/5 (27 votes)
27 Nov 2007CPOL12 min read 90.4K   2.9K   50  
A Survey of Popular Check Digit Schemes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test Page for CheckLuhnMod10.js</title>
<script language="javascript" type="text/javascript" src="../CheckLuhnMod10.js"></script>
<script language="javascript" type="text/javascript" src="coretest.js"></script>
<script language="javascript" type="text/javascript" src="../jsunit/app/jsUnitCore.js"></script>
<script language="javascript" type="text/javascript" src="jsunitrunner.js"></script>

</head>
<body>
<h1>Test Page for CheckLuhnMod10.js</h1>
<script language="javascript" type="text/javascript">

function getCheckInstance() {
   return LuhnMod10Check;
}

function badTransposition(a, b) {
   return (a == '0' && b == '9') || (a == '9' && b == '0');
}

var testcases = [testCheck, testSingleError,  testAdjacentTraspositions];
TestRunner.RunTests(testcases);

</script>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Systems / Hardware Administrator
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions