tests: fix parser test with config file
[awesomized/libmemcached] / libtest / error.h
index ca6c575d068fcd265b34bcccc2376e24c161feba..f567d2a3a62b9735ca7298a9bb46537263e6b394 100644 (file)
@@ -1,8 +1,8 @@
 /*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- * 
- *  libtest
  *
- *  Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ *  Data Differential YATL (i.e. libtest)  library
+ *
+ *  Copyright (C) 2012 Data Differential, http://datadifferential.com/
  *
  *  Redistribution and use in source and binary forms, with or without
  *  modification, are permitted provided that the following conditions are
  *
  */
 
-
 #pragma once
 
 enum test_return_t {
-  TEST_SUCCESS= 0, /* Backwards compatibility */
+  TEST_SUCCESS,
   TEST_FAILURE,
-  TEST_MEMORY_ALLOCATION_FAILURE,
-  TEST_SKIPPED,
-  TEST_FATAL // Collection should not be continued
+  TEST_SKIPPED
 };
 
 
-#define test_failed(__test_return_t) ((__test_return_t) != TEST_SUCCESS)
-#define test_success(__test_return_t) ((__test_return_t) == TEST_SUCCESS)
+static inline bool test_success(test_return_t rc)
+{
+  return (rc == TEST_SUCCESS);
+}
+
+static inline bool test_failed(test_return_t rc)
+{
+  return (rc != TEST_SUCCESS);
+}