1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00
libpsyc/test/testMatch.c

21 lines
949 B
C
Raw Normal View History

2011-04-16 15:30:03 +00:00
#include <stdio.h>
#include "../include/psyc/lib.h"
int main() {
if (PSYC_matches("_failure_delivery", 0, "_failure_unsuccessful_delivery_death", 0)) return -1;
if (PSYC_matches("_failure_trash", 8, "_failure_unsuccessful_delivery_death", 0)) return -2;
if (PSYC_matches("_unsuccessful", 0, "_failure_unsuccessful_delivery_death", 0)) return -3;
2011-04-20 16:59:27 +00:00
unless (PSYC_matches("_fail", 0, "_failure_unsuccessful_delivery_death", 0)) return -4;
2011-04-16 15:30:03 +00:00
unless (PSYC_matches("_truthahn", 0, "_failure_unsuccessful_delivery_death", 0)) return -5;
2011-04-20 16:59:27 +00:00
puts("PSYC_matches passed all tests.");
2011-04-20 21:08:20 +00:00
unless (PSYC_inherits("_failure_delivery", 0, "_failure_unsuccessful_delivery_death", 0)) return -11;
if (PSYC_inherits("_failure_unsuccessful", 0, "_failure_unsuccessful_delivery_death", 0)) return -12;
unless (PSYC_inherits("_fail", 0, "_failure_unsuccessful_delivery_death", 0)) return -13;
puts("PSYC_inherits passed all tests.");
2011-04-16 15:30:03 +00:00
return 0; // passed all tests
}