Skip to content

Commit

Permalink
Merge branch 'release/v0.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
myurasov committed Mar 17, 2016
2 parents c4620ed + 544bf00 commit 397c6d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

Unit Testing Framework for EI/Squirrel.

_Version: 0.4.2_

## License

The code in this repository is licensed under [MIT License](./LICENSE).
11 changes: 5 additions & 6 deletions dist/impUnit.nut
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* impUnit Test Framework
*
* @author Mikhail Yurasov <[email protected]>
* @version 0.4.2
* @version 0.4.3
* @package ImpUnit
*/

Expand Down Expand Up @@ -535,16 +535,15 @@ local ImpTestCase = class {
case "class":
case "array":

foreach (k, v in value2) {

foreach (k, v in value1) {
path += "." + k;

if (!(k in value1)) {
if (!(k in value2)) {
throw format("%s slot [%s] in actual value",
isForwardPass ? "Missing" : "Extra", cleanPath(path));
}

this._assertDeepEqual(value2[k], value1[k], message, isForwardPass, path, level + 1);
this._assertDeepEqual(value1[k], value2[k], message, isForwardPass, path, level + 1);
}

break;
Expand All @@ -554,7 +553,7 @@ local ImpTestCase = class {

default:
if (value2 != value1) {
throw format(message, cleanPath(path), value2 + "", value1 + "");
throw format(message, cleanPath(path), value1 + "", value2 + "");
}

break;
Expand Down
2 changes: 1 addition & 1 deletion index.nut
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* impUnit Test Framework
*
* @author Mikhail Yurasov <[email protected]>
* @version 0.4.2
* @version 0.4.3
* @package ImpUnit
*/

Expand Down
9 changes: 4 additions & 5 deletions src/TestCase.nut
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,15 @@ local ImpTestCase = class {
case "class":
case "array":

foreach (k, v in value2) {

foreach (k, v in value1) {
path += "." + k;

if (!(k in value1)) {
if (!(k in value2)) {
throw format("%s slot [%s] in actual value",
isForwardPass ? "Missing" : "Extra", cleanPath(path));
}

this._assertDeepEqual(value2[k], value1[k], message, isForwardPass, path, level + 1);
this._assertDeepEqual(value1[k], value2[k], message, isForwardPass, path, level + 1);
}

break;
Expand All @@ -123,7 +122,7 @@ local ImpTestCase = class {

default:
if (value2 != value1) {
throw format(message, cleanPath(path), value2 + "", value1 + "");
throw format(message, cleanPath(path), value1 + "", value2 + "");
}

break;
Expand Down

0 comments on commit 397c6d7

Please sign in to comment.