Coverage Report

Created: 2026-03-28 06:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/trafficserver/lib/yamlcpp/src/regex_yaml.cpp
Line
Count
Source
1
#include "regex_yaml.h"
2
3
namespace YAML {
4
// constructors
5
6
5.22k
RegEx::RegEx(REGEX_OP op) : m_op(op), m_a(0), m_z(0), m_params{} {}
7
18
RegEx::RegEx() : RegEx(REGEX_EMPTY) {}
8
9
6.99k
RegEx::RegEx(char ch) : m_op(REGEX_MATCH), m_a(ch), m_z(0), m_params{} {}
10
11
10
RegEx::RegEx(char a, char z) : m_op(REGEX_RANGE), m_a(a), m_z(z), m_params{} {}
12
13
RegEx::RegEx(const std::string& str, REGEX_OP op)
14
32
    : m_op(op), m_a(0), m_z(0), m_params(str.begin(), str.end()) {}
15
16
// combination constructors
17
2.55k
RegEx operator!(const RegEx& ex) {
18
2.55k
  RegEx ret(REGEX_NOT);
19
2.55k
  ret.m_params.push_back(ex);
20
2.55k
  return ret;
21
2.55k
}
22
23
72
RegEx operator|(const RegEx& ex1, const RegEx& ex2) {
24
72
  RegEx ret(REGEX_OR);
25
72
  ret.m_params.push_back(ex1);
26
72
  ret.m_params.push_back(ex2);
27
72
  return ret;
28
72
}
29
30
2.54k
RegEx operator&(const RegEx& ex1, const RegEx& ex2) {
31
2.54k
  RegEx ret(REGEX_AND);
32
2.54k
  ret.m_params.push_back(ex1);
33
2.54k
  ret.m_params.push_back(ex2);
34
2.54k
  return ret;
35
2.54k
}
36
37
40
RegEx operator+(const RegEx& ex1, const RegEx& ex2) {
38
40
  RegEx ret(REGEX_SEQ);
39
40
  ret.m_params.push_back(ex1);
40
40
  ret.m_params.push_back(ex2);
41
40
  return ret;
42
40
}
43
}  // namespace YAML