summaryrefslogtreecommitdiff
path: root/core/test_scalar.cpp
blob: 3c572667edb26a27b625d138f5be906969fe56b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "stdio.h"

#include "scalar.hpp"
#include "mempool.hpp"

int main() {
  Scalar<int> eins("eins"), zwei("zwei");
  Scalar<uint8_t, 1> bit1("bit");

  eins() = 1;
  zwei() = 2 * eins();
  bit1.set(1);

  int result = bit1() * eins() * zwei();

  fprintf(stderr, "bit mul result = %d", result);

  if (result == 2) {
    return 0;
  }else{
    return -1;
  }
}
contact: Jan Huwald // Impressum