Pair and Triple Compare w/ Unit Tests (#2359)

* Pair and Triple Compare w/ Unit Tests
* scope creep myself by adding date-time eq op
* make Pair and Triple printable
* Update releasenotes. Restrict equals on tuples to when underlying type supports `==`. Remove unnecessary Time.eq.

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
Zack Puhl
2025-08-02 17:11:27 -04:00
committed by GitHub
parent e707190539
commit 2a47cc2ca9
7 changed files with 160 additions and 3 deletions

View File

@@ -13,6 +13,20 @@ fn void time_diff()
test::eq(t, t2);
}
fn void time_eq()
{
Time t = time::now();
Time t2 = t;
assert(t == t2);
t2 += time::US;
assert(t != t2);
t2 -= time::US;
assert(t == t2);
}
fn void clock_diff()
{
Clock c = clock::now();