File: bitmatrix.cpp

package info (click to toggle)
iqtree 2.0.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,700 kB
  • sloc: cpp: 142,571; ansic: 57,789; sh: 275; python: 242; makefile: 95
file content (23 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <catch.hpp>

#include <terraces/bitmatrix.hpp>

namespace terraces {
namespace tests {

TEST_CASE("bitmatrix-construction", "[bitmatrix]") {
	auto mat = bitmatrix{10, 5};
	CHECK(mat.rows() == 10);
	CHECK(mat.cols() == 5);
}

TEST_CASE("bitmatrix set/get", "[bitmatrix]") {
	auto mat = bitmatrix{3, 4};

	CHECK(!mat.get(1, 2));
	mat.set(1, 2, true);
	CHECK(mat.get(1, 2));
}

} // namespace tests
} // namespace terraces