Repair testsuites
This commit is contained in:
parent
7df013a6aa
commit
b203e4f97f
3 changed files with 13 additions and 5 deletions
|
@ -3,7 +3,14 @@ import 'package:test/expect.dart';
|
||||||
import 'package:test/scaffolding.dart';
|
import 'package:test/scaffolding.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
test("DBIKC", () {
|
// Various tests!
|
||||||
expect("KAZNIA", DoubleBreastedInterruptedKeyCipher.encode("RUBNIU"));
|
test("DBIKC", () async {
|
||||||
|
// This test will check if DBIKC properly encodes.
|
||||||
|
String input = "KAZNIA";
|
||||||
|
String expected = "RUBIU";
|
||||||
|
String encoded = DoubleBreastedInterruptedKeyCipher.encode(input);
|
||||||
|
|
||||||
|
expect(expected, encoded);
|
||||||
|
expect(input, DoubleBreastedInterruptedKeyCipher.decode(encoded));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ Future<void> main() async {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Test directory size checking", () async {
|
test("Test directory size checking", () async {
|
||||||
expect(await getDirectorySize("test"), 121680);
|
expect(await getDirectorySize("test"), 121956);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Test file info methods", () async {
|
test("Test file info methods", () async {
|
||||||
|
|
|
@ -6,7 +6,7 @@ void main() {
|
||||||
test("Parse time notation", () {
|
test("Parse time notation", () {
|
||||||
Time time = Time.fromNotation("4h9s");
|
Time time = Time.fromNotation("4h9s");
|
||||||
|
|
||||||
expect(time.toString(), "4h9s");
|
expect(time.toString(), "4h 9s");
|
||||||
expect(time.hours, 4);
|
expect(time.hours, 4);
|
||||||
expect(time.minutes, 0);
|
expect(time.minutes, 0);
|
||||||
expect(time.seconds, 9);
|
expect(time.seconds, 9);
|
||||||
|
@ -15,8 +15,9 @@ void main() {
|
||||||
test("Add time", () {
|
test("Add time", () {
|
||||||
// Depends on first test working!
|
// Depends on first test working!
|
||||||
Time time = Time.fromNotation("4h9s");
|
Time time = Time.fromNotation("4h9s");
|
||||||
time.add(Time(hours: 0, minutes: 80, seconds: 1));
|
time.add(Time(days: 0, hours: 0, minutes: 80, seconds: 1));
|
||||||
|
|
||||||
|
expect(time.days, 0);
|
||||||
expect(time.hours, 5);
|
expect(time.hours, 5);
|
||||||
expect(time.minutes, 20);
|
expect(time.minutes, 20);
|
||||||
expect(time.seconds, 10);
|
expect(time.seconds, 10);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue