pokeemerald/test/fpmath.c
Eduardo Quezada 09fc48461f Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	test/battle/move_flags/three_strikes.c
#	test/move_flag_strike_count.c
#	test/move_flag_three_strikes.c
#	test/powder_moves.c
#	test/status1.c
2023-08-12 16:31:44 -04:00

19 lines
527 B
C

#include "global.h"
#include "test/test.h"
TEST("uq4_12_add adds 4.12 numbers") {
EXPECT_EQ(uq4_12_add(UQ_4_12(3.5), UQ_4_12(2.5)), UQ_4_12(6.0));
}
TEST("uq4_12_subtract subtracts 4.12 numbers") {
EXPECT_EQ(uq4_12_subtract(UQ_4_12(3.5), UQ_4_12(2.0)), UQ_4_12(1.5));
}
TEST("uq4_12_multiply multiplies 4.12 numbers") {
EXPECT_EQ(uq4_12_multiply(UQ_4_12(3.5), UQ_4_12(2.0)), UQ_4_12(7.0));
}
TEST("uq4_12_divide divides 4.12 numbers") {
EXPECT_EQ(uq4_12_divide(UQ_4_12(5.0), UQ_4_12(2.0)), UQ_4_12(2.5));
}