File: testsizes.c

package info (click to toggle)
kissat 4.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,068 kB
  • sloc: ansic: 39,201; sh: 1,226; makefile: 91
file content (16 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "test.h"

bool test_sizes (void) {
  printf ("sizeof (word) = %zu\n", sizeof (word));
  assert (sizeof (void *) == sizeof (word));
  assert (MAX_REF < INVALID_REF);
  assert (MAX_ARENA < INVALID_REF);
  printf ("sizeof (clause) = %zu\n", sizeof (clause));
  printf ("SIZE_OF_CLAUSE_HEADER = %zu\n", SIZE_OF_CLAUSE_HEADER);
  assert (SIZE_OF_CLAUSE_HEADER == sizeof (unsigned));
  printf ("sizeof (flags) = %zu\n", sizeof (flags));
  assert (sizeof (flags) == 1);
  printf ("sizeof (value) = %zu\n", sizeof (value));
  assert (sizeof (value) == 1);
  return false;
}