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

antonvw / wex / 20442153994

22 Dec 2025 07:39PM UTC coverage: 64.31% (-0.04%) from 64.348%
20442153994

push

github

web-flow
1131 use boostparser (#1132)

* prototype use boost::parser for unified_diff parsing

* use boost trace if log level is trace

* parsing seems OK, and action is set by semantic action

* implemented some actions

* prototype is OK

* updated comments

* now replaced the old parser by the new boost::parser

* fixed tests

* fixed compile error

* final updates

18531 of 31589 branches covered (58.66%)

Branch coverage included in aggregate %.

14764 of 20184 relevant lines covered (73.15%)

1512.67 hits per line

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

35.71
/src/vcs/unified-diff.cpp
1
////////////////////////////////////////////////////////////////////////////////
2
// Name:      unified-diff.cpp
3
// Purpose:   Implementation of class wex::unified_diff
4
//            https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html
5
// Author:    Anton van Wezenbeek
6
// Copyright: (c) 2024 Anton van Wezenbeek
7
////////////////////////////////////////////////////////////////////////////////
8

9
#include <wex/core/log.h>
10
#include <wex/factory/frame.h>
11
#include <wex/vcs/unified-diff.h>
12
#include <wex/vcs/vcs-entry.h>
13
#include <wex/vcs/vcs.h>
14

15
wex::unified_diff::unified_diff(
1✔
16
  const path&      p,
17
  const vcs_entry* e,
18
  factory::frame*  f)
1✔
19
  : factory::unified_diff(e->std_out())
1✔
20
  , m_path_vcs(p)
1✔
21
  , m_frame(f)
1✔
22
  , m_path_toplevel(vcs().toplevel())
1✔
23
  , m_vcs_entry(e)
1✔
24
{
25
  m_frame->page_save();
1✔
26
}
1✔
27

28
bool wex::unified_diff::report_diff()
×
29
{
30
  m_path_vcs = path(m_path_toplevel).append(m_path[0]);
×
31

32
  if (!m_path_vcs.dir_exists())
×
33
  {
34
    if (!m_path_vcs.file_exists())
×
35
    {
36
      log("unified_diff") << m_path_vcs.string() << "does not exist";
×
37
      return false;
×
38
    }
39

40
    if (!m_frame->vcs_unified_diff(m_vcs_entry, this))
×
41
    {
42
      return false;
×
43
    }
44
  }
45

46
  return true;
×
47
}
48

49
void wex::unified_diff::report_diff_finish()
×
50
{
51
  m_frame->vcs_unified_diff(m_vcs_entry, this);
×
52
  m_frame->page_restore();
×
53
}
×
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

© 2026 Coveralls, Inc