Commit Graph

3 Commits

Author SHA1 Message Date
Martin Janiczek
5a8781393a AK: Cover TestComplex with more tests
Related:
- video detailing the process of writing these tests: https://www.youtube.com/watch?v=enxglLlALvI
- PR fixing bugs the above effort found: https://github.com/SerenityOS/serenity/pull/22025
2024-01-12 16:42:51 -07:00
Martin Janiczek
58d0577a02 AK: Fix bugs in Complex += -= + - * / operators
There were two issues:

1) the C+=R and C-=R operators expected arithmetic types to have .real()

2) the R+C, R-C, R*C and R/C operators applied the operation in wrong
   order (did C+R, C-R, C*R and C/R instead). This wouldn't matter for
   + and * which are commutative, but is incorrect for - and /.
2023-11-23 19:54:39 -05:00
Brian Gianforcaro
67322b0702 Tests: Move AK tests to Tests/AK 2021-05-06 17:54:28 +02:00