test_compass_impl.cpp 670 Bytes
Newer Older
1 2 3
#include "catch.hpp"

#include "compass.hpp"
steinbac's avatar
steinbac committed
4 5 6 7 8 9 10

#include <vector>
#include <iostream>
#include <string>
#include <algorithm>


11
TEST_CASE( "compass_fundamentals" ){
steinbac's avatar
steinbac committed
12

13
  SECTION( "compass_works_at_runtime" ){
steinbac's avatar
steinbac committed
14

15
    auto value = compass::runtime::works();
steinbac's avatar
steinbac committed
16

17
    REQUIRE(value);
steinbac's avatar
steinbac committed
18

19
  }
steinbac's avatar
steinbac committed
20

21
  SECTION( "compass_yields_vendor_name" ){
steinbac's avatar
steinbac committed
22

23 24
    auto value = compass::runtime::vendor();
    REQUIRE(value.size()!=0u);
steinbac's avatar
steinbac committed
25

26
  }
27

28
  SECTION( "compass_yields_non_zero_corecount" ){
steinbac's avatar
steinbac committed
29

steinbac's avatar
steinbac committed
30
    auto value = compass::runtime::threads();
31
    REQUIRE(value>0u);
steinbac's avatar
steinbac committed
32

33
  }
steinbac's avatar
steinbac committed
34

35
  SECTION( "compass_yields_non_zero_L1size" ){
steinbac's avatar
steinbac committed
36

37 38
    auto value = compass::runtime::size::cacheline::level(1);
    REQUIRE(value>0u);
steinbac's avatar
steinbac committed
39

40
  }
41 42


43
}