2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2023-08-30 05:35:32 +00:00
|
|
|
import { assertGreater, assertThrows } from "./mod.ts";
|
|
|
|
|
2023-12-08 16:04:29 +00:00
|
|
|
Deno.test("assertGreaterOrEqual() matches when actual value is greater than expected value", () => {
|
2023-08-30 05:35:32 +00:00
|
|
|
assertGreater(2, 1);
|
|
|
|
assertGreater(2n, 1n);
|
|
|
|
assertGreater(1.1, 1);
|
2023-12-08 16:04:29 +00:00
|
|
|
});
|
2023-08-30 05:35:32 +00:00
|
|
|
|
2023-12-08 16:04:29 +00:00
|
|
|
Deno.test("assertGreaterOrEqual() throws when actual value is smaller or equal than expected value", () => {
|
2023-08-30 05:35:32 +00:00
|
|
|
assertThrows(() => assertGreater(1, 2));
|
|
|
|
});
|