diff --git a/src/t_misc.c b/src/t_misc.c
index 74a57ca9b438e75fcbf222b4bbbc79a951c39022..92c2b326471d48a82fcae8f110d1febad58c6fe3 100644
--- a/src/t_misc.c
+++ b/src/t_misc.c
@@ -26,7 +26,7 @@ static void test_tt_registry(void) {
     g_test_message("Unknown token type should not return a name");
     g_test_fail();
   }
-  g_check_cmp_int32(h_get_token_type_number("com.upstandinghackers.test.unkown_token_type"), ==, -1);
+  g_check_cmp_int32(h_get_token_type_number("com.upstandinghackers.test.unkown_token_type"), ==, 0);
 }
 
 void register_misc_tests(void) {