aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
blob: 75d3bb7c36ba05e9ad5576df1ebfaec7ee172649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "unittest.h"
#include "board.h"

void test_notations() {
  printf("%u\n", notation_to_index('e', 4));
  unit_test(notation_to_index('e', 4) == 28, "Notation e4 is index 28");

  char notation[2] = "x0";
  index_to_notation(28, notation);
  unit_test(notation[0] == 'e' && notation [1] == '4', "Index 28 is notation e4");
}

int main() {
  test_notations();

  report();
  return 0;
}