Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Comment:
Migrated to Confluence 5.3
Excerpt |
---|
A basic inequality checking assertion... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
notEqual( expectedactual, actualexpected, message ); |
Parameters
Parameter | Type | Mandatory | Notes | API Version |
---|---|---|---|---|
expectedactual | Variant | The expected actual value. | 1.0 | |
actualexpected | Variant | The actual expected value. | 1.0 | |
message | String | A message stating what the assertion is testing. | 1.0 |
Return Values
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 |
Example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Test("Inequality checks", Test.ANY( ), function(_global, settings) {
// 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?" );
}); |
Div | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Test APITopics:
|