diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-01-28 17:06:57 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-01-28 17:06:57 +0100 |
commit | 4247b81e7756ce1ff01e097e634a9dcbc0912787 (patch) | |
tree | af14dd7aedf6b06826b5c15e3994431ed86f84a7 /diff.cpp | |
parent | a61c702d91d7444ce0bb094ddccc70f72416500b (diff) |
Added tests
Diffstat (limited to 'diff.cpp')
-rw-r--r-- | diff.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -115,6 +115,10 @@ void Diff::create(const std::string& xml) m_pos0 = tree.get<int>("diff.start"); m_pos1 = tree.get<int>("diff.end"); + + if (m_pos0 > m_pos1) + throw std::runtime_error("Bad range in diff"); + m_data = tree.get<std::string>("diff.data"); } |