Debian Codegraph @

unit_tests/test_weights.cpp

raw symbols SCIP
1 #include "catch.hpp"
2
3 #include <vector>
4
5 #include "weights.h"
6
7 TEST_CASE("effective lengths", "[eff_lens]")
8 {
9 std::vector<int> lens(3, 19);
10 auto res = calc_eff_lens(lens, 3.0);
11 for (auto& val: res)
12 {
13 REQUIRE(val == static_cast<double>(19) - 3.0 + 1);
14 }
15 }
16
17
18 // TEST_CASE("calc weights", "[weights]")
19 // {
20 // EcMap tmp_map;
21 // tmp_map.insert( {0, {0}} );
22 // tmp_map.insert( {1, {1}} );
23 // tmp_map.insert( {2, {2}} );
24 // tmp_map.insert( {3, {0, 2}} );
25 // tmp_map.insert( {4, {0, 1}} );
26 //
27 // std::vector<int> counts {3, 1, 0, 10, 7};
28 // std::vector<double> eff_lens {307.4, 500.4, 302.0};
29 //
30 // auto w = calc_weights(counts, tmp_map, eff_lens);
31 // REQUIRE( w.size() == 5 );
32 //
33 // std::cout << std::endl;
34 //
35 // // TODO: actually compute the assertions
36 // for (auto& kv : w) {
37 // std::cout << "ecid:\t" << kv.first;
38 // for (auto& a_weight : kv.second) {
39 // std::cout << "\t" << a_weight;
40 // }
41 // std::cout << std::endl;
42 // }
43 //
44 // // TODO: more rigorous test
45 // }