miniroon

Simplistic macaroon-based authorization for Unix systems
git clone https://ccx.te2000.cz/git/miniroon
Log | Files | Refs | README

cmd_test.c (534B)


      1 #include "tests.h"
      2 
      3 /* Declare a local suite. */
      4 SUITE(selftest);
      5 
      6 TEST expect_equal(void) {
      7     int i = 10;
      8     ASSERT_EQ(10, i);
      9     PASS();
     10 }
     11 
     12 /* Primary test suite. */
     13 SUITE(selftest) {
     14     RUN_TEST(expect_equal);
     15 }
     16 
     17 /* Add definitions that need to be in the test runner's main file. */
     18 GREATEST_MAIN_DEFS();
     19 
     20 int main(int argc, char **argv) {
     21     GREATEST_MAIN_BEGIN();      /* command-line arguments, initialization. */
     22 
     23     RUN_SUITE(selftest);
     24     RUN_SUITE(blackbox);
     25 
     26     GREATEST_MAIN_END();        /* display results */
     27 }