feat: implement CPP03 C++20 card
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { access, readFile } from 'node:fs/promises';
|
||||
import test from 'node:test';
|
||||
const source = JSON.parse(await readFile(new URL('../json/card_source.json', import.meta.url), 'utf8'));
|
||||
test('CPP03 identity and task order are stable', () => {
|
||||
assert.equal(source.card.number, '03');
|
||||
assert.equal(source.card.uuid, 'e3e22a6d-bff3-549c-a840-f2bce0c2c498');
|
||||
assert.deepEqual(source.tasks_order, ['task01', 'task02', 'task03']);
|
||||
assert.match(JSON.stringify(source), /C\+\+20/);
|
||||
});
|
||||
test('all task programs and expected outputs exist', async () => {
|
||||
for (const task of ['task01', 'task02', 'task03']) {
|
||||
await access(new URL(`../src/${task}/main.cpp`, import.meta.url));
|
||||
await access(new URL(`./expected/${task}.txt`, import.meta.url));
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user