-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathC.test.js
More file actions
42 lines (34 loc) · 1.08 KB
/
C.test.js
File metadata and controls
42 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import assert from 'node:assert/strict';
import { describe, test } from 'node:test';
import fn from './C_draft.js';
describe('september_2021_B/lesson_7/C_draft', () => {
test('1', () => {
assert.strictEqual(fn(['1', '-1 0', '-5 -3', '2 5', '0 0']), 'No solution');
});
test('2', () => {
assert.deepStrictEqual(fn(['1', '-1 0', '0 1', '0 0']), ['1', '0 1']);
});
test('my', () => {
assert.deepStrictEqual(fn(['2', '0 2', '0 0']), ['1', '0 2']);
});
test('my 2', () => {
assert.deepStrictEqual(fn(['2', '0 5', '0 0']), ['1', '0 5']);
});
test('my 3', () => {
assert.strictEqual(fn(['2', '2 5', '0 0']), 'No solution');
});
test('my 4', () => {
assert.deepStrictEqual(fn(['2', '0 1', '1 1', '1 2', '0 0']), [
'2',
'0 1',
'1 2',
]);
});
// test('my 5', () => {
// assert.strictEqual(fn(['2', '0 1', '1 1', '1 2', '0 3', '0 0']), ['1', '0 3']);
// });
// TODO: DRAFT version, solution not ready, test failed
// test('my 6', () => {
// assert.strictEqual(fn(['2', '0 1', '1 2', '0 2', '0 0']), ['1', '0 2']);
// });
});