1 /* Copyright 2015-present Samsung Electronics Co., Ltd. and other contributors
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 var assert = require('assert');
19 assert.assert(1 == 1);
22 assert.notEqual(1, 2);
24 assert.strictEqual(0, 0);
26 assert.equal(0, false);
27 assert.notStrictEqual(0, false);
38 assert.assert(1 == 2);
45 assert.assert(1 == 1);
53 assert.assert(1 == 2);
61 assert.assert(false, 'assert test');
63 assert.equal(e.name, 'AssertionError');
64 assert.equal(e.actual, false);
65 assert.equal(e.expected, true);
66 assert.equal(e.operator, '==');
67 assert.equal(e.message, 'assert test');
71 assert.equal(1, 2, 'assert.equal test');
73 assert.equal(e.name, 'AssertionError');
74 assert.equal(e.actual, 1);
75 assert.equal(e.expected, 2);
76 assert.equal(e.operator, '==');
77 assert.equal(e.message, 'assert.equal test');
82 assert.fail('actual', 'expected', 'message', 'operator');
84 assert.equal(e.name, 'AssertionError');
85 assert.equal(e.actual, 'actual');
86 assert.equal(e.expected, 'expected');
87 assert.equal(e.operator, 'operator');
88 assert.equal(e.message, 'message');