File: test.c

package info (click to toggle)
libntru 0.5-3
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 896 kB
  • sloc: ansic: 9,370; perl: 3,521; makefile: 22; sh: 10
file content (20 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <stdint.h>
#include "test_poly.h"
#include "test_ntru.h"
#include "test_idxgen.h"
#include "test_bitstring.h"
#include "test_key.h"
#include "test_hash.h"

int main(int argc, char** argv) {
    printf("Running tests...\n");
    uint8_t pass = test_poly();
    pass &= test_ntru();
    pass &= test_idxgen();
    pass &= test_bitstring();
    pass &= test_key();
    pass &= test_hash();
    printf("%s\n", pass?"All tests passed":"One or more tests failed");
    return pass ? 0 : 1;
}