A basic inequality checking assertion... |
notEqual( actual, expected, message ); |
Parameter | Type | Mandatory | Notes | API Version |
---|---|---|---|---|
actual | Variant | The actual value. | 1.0 | |
expected | Variant | The expected value. | 1.0 | |
message | String | A message stating what the assertion is testing. | 1.0 |
Value | Type | Notes | API Version |
---|---|---|---|
<error> | Error | Most likely the parameters are wrong. | 1.0 |
true | Boolean | expected != actual. | 1.0 |
false | Boolean | expected == actual. | 1.0 |
Test("Inequality checks", Test.ANY( ), function() { // assertions will fail notEqual( true, true, "true != true?" ); notEqual( undefined, null, "undefined != null?" ); notEqual( null, false, "null != false?" ); notEqual( "fish", true, "'fish' != true?" ); // assertion will pass notEqual( true, false, "true != false?" ); }); |