feat: implement CPP08 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('CPP08 identity and task order are stable', () => {
|
||||
assert.equal(source.card.number, '08');
|
||||
assert.equal(source.card.uuid, '0d0c3a10-2744-5245-ad9e-8a910694a5b2');
|
||||
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