This commit is contained in:
2025-02-02 22:48:09 +01:00
parent 1146914ec3
commit 69e937d98e
3 changed files with 79 additions and 0 deletions

19
5kyu/buddy-pairs/tests.ts Normal file
View File

@@ -0,0 +1,19 @@
import { assert } from "chai";
import { buddy } from "./solution";
describe("buddy", function() {
function testing(start: number, limit: number, expect:number[]) {
let actual = buddy(start, limit);
assert.deepEqual(actual, expect);
}
it("Basic tests", function() {
testing(10, 50, [48, 75] );
testing(1071625, 1103735, [1081184, 1331967] );
testing(57345, 90061, [62744, 75495] );
testing(2382, 3679, [] );
})
});