29 lines
726 B
C
Raw Normal View History

2025-03-16 05:49:29 +01:00
// Written by retoor@molodetz.nl
// This program tests various types using the rtypes and rtest libraries, asserting the expected behaviors of the defined types such as
// unsigned integers, long integers, and byte values.
// The source includes custom libraries "rtest.h" and "rtypes.h" which provide functionality for type definition and testing assertions.
// The code is licensed under the MIT License.
2025-01-14 18:53:15 +01:00
#include "rtest.h"
#include "rtypes.h"
int main() {
rtest_banner("rtypes");
2025-03-16 05:49:29 +01:00
2025-01-14 18:53:15 +01:00
uint test1 = 1000;
2025-03-16 05:49:29 +01:00
rassert(test1 == 1000);
ulong test2 = -1000;
2025-01-14 18:53:15 +01:00
rassert(test2 == -1000);
2025-03-16 05:49:29 +01:00
2025-01-14 18:53:15 +01:00
byte test3 = 123;
rassert(test3 == 123);
2025-03-16 05:49:29 +01:00
2025-01-14 18:53:15 +01:00
byte test4 = 'A';
rassert(test4 == 65);
2025-03-16 05:49:29 +01:00
2025-01-14 18:53:15 +01:00
return rtest_end("");
2025-03-16 05:49:29 +01:00
}