feat: implement CPP06 C++20 card

This commit is contained in:
user
2026-07-21 20:11:42 +02:00
commit d72f5bae07
36 changed files with 7611 additions and 0 deletions
+16
View File
@@ -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('CPP06 identity and task order are stable', () => {
assert.equal(source.card.number, '06');
assert.equal(source.card.uuid, 'ff5b018f-132a-5690-9407-5961aa4504f2');
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));
}
});