• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

blues / note-arduino / 15450437587

04 Jun 2025 06:57PM CUT coverage: 88.189%. Remained the same
15450437587

push

github

web-flow
version v1.7.1 (#145)

111 of 165 branches covered (67.27%)

Branch coverage included in aggregate %.

337 of 343 relevant lines covered (98.25%)

14.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.31
/src/NoteLog_Arduino.cpp
1
#include "NoteLog_Arduino.hpp"
2

3
// Singleton instance of the NoteLog_Arduino class
4
namespace instance {
5
    inline NoteLog* & note_log (void) {
7✔
6
        static NoteLog* note_log = nullptr;
7
        return note_log;
7✔
8
    }
9
};
10

11
NoteLog *
12
make_note_log (
3✔
13
    nullptr_t
14
) {
15
    NoteLog* & note_log = instance::note_log();
3✔
16
    if (note_log) {
3!
17
        delete note_log;
3!
18
        note_log = nullptr;
3✔
19
    }
20
    return note_log;
3✔
21
}
22

23
template <typename T>
24
NoteLog *
25
make_note_log (
4✔
26
    T & log_parameters_
27
) {
28
    NoteLog* & note_log = instance::note_log();
4✔
29
    if (!note_log) {
4✔
30
        note_log = new NoteLog_Arduino(reinterpret_cast<T *>(&log_parameters_));
3✔
31
    }
32

33
    return note_log;
4✔
34
}
35

36
NoteLog_Arduino::NoteLog_Arduino
5✔
37
(
38
    Stream * log_stream_
39
) :
5✔
40
    _notecardLog(log_stream_)
5✔
41
{ }
5✔
42

43
size_t
44
NoteLog_Arduino::print (
2✔
45
    const char * str_
46
)
47
{
48
    size_t result;
49

50
    result = _notecardLog->print(str_);
2✔
51

52
    return result;
2✔
53
}
54

55
// Explicitly instantiate the template function for the supported types
56
template NoteLog * make_note_log<Stream>(Stream &);
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc