GCC Code Coverage Report


Directory: ./
File: Fw/Test/String.hpp
Date: 2026-09-03 22:12:29
Exec Total Coverage
Lines: 0 10 0.0%
Functions: 0 6 0.0%
Branches: 0 2 0.0%

Line Branch Exec Source
1 // ======================================================================
2 // @file Test/String.hpp
3 // @author F Prime
4 // @brief A longer string for testing
5 // ======================================================================
6
7 #ifndef FW_TEST_STRING_HPP
8 #define FW_TEST_STRING_HPP
9
10 #include <Fw/FPrimeBasicTypes.hpp>
11
12 #include "Fw/Types/StringBase.hpp"
13
14 namespace Test {
15
16 class String : public Fw::StringBase {
17 public:
18 enum {
19 STRING_SIZE = 256,
20 SERIALIZED_SIZE = STATIC_SERIALIZED_SIZE(STRING_SIZE),
21 };
22
23 String() : StringBase() { *this = ""; }
24
25 String(const String& src) : StringBase() { *this = src; }
26
27 String(const ConstStringBase& src) : StringBase() { *this = src; }
28
29 String(const char* src) : StringBase() { *this = src; }
30
31 String& operator=(const String& src) {
32 (void)StringBase::operator=(src);
33 return *this;
34 }
35
36 String& operator=(const ConstStringBase& src) {
37 (void)StringBase::operator=(src);
38 return *this;
39 }
40
41 String& operator=(const char* src) {
42 (void)StringBase::operator=(src);
43 return *this;
44 }
45
46 const char* toChar() const { return this->m_buf; }
47
48 StringBase::SizeType getCapacity() const { return sizeof this->m_buf; }
49
50 private:
51 char m_buf[BUFFER_SIZE(STRING_SIZE)];
52 };
53 } // namespace Test
54
55 #endif
56