feat: init

This commit is contained in:
Darwin Cereska
2026-03-27 19:39:50 +01:00
commit fb3c0a7474
9 changed files with 262 additions and 0 deletions

53
test/bolt_test.dart Normal file
View File

@@ -0,0 +1,53 @@
import 'package:bolt/bolt.dart';
import 'package:test/test.dart';
void main() {
group("Bolt: Check core functions", () {
test("Levenshtein", () {
// Create cases
List<Map<String, dynamic>> tests = [
{
"name": "Equal strings (case sensitive)",
"s": "hello",
"t": "hello",
"ignoreCase": false,
"expected": 0,
},
{
"name": "Equal strings (case insensitive)",
"s": "Hello",
"t": "hello",
"ignoreCase": true,
"expected": 0,
},
{
"name": "Different strings (case sensitive)",
"s": "kitten",
"t": "sitting",
"ignoreCase": false,
"expected": 3,
},
{
"name": "Different strings (case insensitive)",
"s": "Kitten",
"t": "Sitting",
"ignoreCase": true,
"expected": 3,
},
{
"name": "One empty string",
"s": "abc",
"t": "",
"ignoreCase": false,
"expected": 3,
},
];
// Run tests
for (var t in tests) {
print("Running test: ${t["name"]}");
expect(ld(t["s"], t["t"], t["ignoreCase"]), t["expected"]);
}
});
});
}