GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/RGBN.cpp Lines: 12 12 100.0 %
Date: 2022-10-11 07:18:13 Branches: 8 8 100.0 %

Line Branch Exec Source
1
#include "RGBN.hpp"
2
3
namespace blink1_lib {
4
34
    RGBN::RGBN(const std::uint8_t _r, const std::uint8_t _g, const std::uint8_t _b, const std::uint8_t _n) noexcept
5
34
        : r(_r), g(_g), b(_b), n(_n) {}
6
7
10
    bool RGBN::operator==(const RGBN& other) const noexcept {
8


10
        return r == other.r && g == other.g && b == other.b && n == other.n;
9
    }
10
11
4
    bool RGBN::operator!=(const RGBN& other) const noexcept {
12
4
        return !(*this == other);
13
    }
14
15
2
    std::ostream& operator<<(std::ostream& os, const RGBN& rgb) {
16
2
        os << "RGBN{r=" << static_cast<unsigned>(rgb.r)
17
2
            << ", g=" << static_cast<unsigned>(rgb.g)
18
2
            << ", b=" << static_cast<unsigned>(rgb.b)
19
2
            << ", n=" << static_cast<unsigned>(rgb.n) << "}";
20
2
        return os;
21
    }
22
}