all repos — TinyCrypT @ 7c83dae0a692a5e2936e84d6072b57be373b0b66

Short and sweet classical cryptographic primitives

tinycrypt/tests/main.c (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
#include <stdbool.h>
#include <stdio.h>

#include "tinycrypt/tests/harness.h"

int
main (int argc, const char **argv)
{
  struct tct_testing_ctx ctx;
  tct_testing_init_ctx (&ctx);
  printf ("Beginning tests\n");
  tct_testing_start (&ctx);

  // Tests go here

  tct_testing_end (&ctx);
  printf ("%lu tests passed, %lu tests failed, %lu microseconds elapsed\n",
          ctx.tests_passed, ctx.tests_failed,
          (1000000 * ctx.end.tv_sec + ctx.end.tv_usec)
              - (1000000 * ctx.start.tv_sec + ctx.start.tv_usec));
}