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

libbitcoin / libbitcoin-system / 41739337421

03 Nov 2026 11:27PM UTC coverage: 96.274% (-0.6%) from 96.843%
41739337421

push

github

web-flow
Merge pull request #2151 from evoskuil/master

Stop reading on reader failure, export instantiations only for windows libs.

11 of 11 new or added lines in 5 files covered. (100.0%)

302 existing lines in 67 files now uncovered.

26460 of 27484 relevant lines covered (96.27%)

4041533.64 hits per line

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

20.69
/src/config/script.cpp
1
/**
2
 * Copyright (c) 2011-2026 libbitcoin developers
3
 *
4
 * This file is part of libbitcoin.
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU Affero General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU Affero General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Affero General Public License
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 */
19
#include <bitcoin/system/config/script.hpp>
20

21
#include <sstream>
22
#include <bitcoin/system/chain/script.hpp>
23
#include <bitcoin/system/data/data.hpp>
24

25
namespace libbitcoin {
26
namespace system {
27
namespace config {
28

29
script::script() NOEXCEPT
169 ✔
30
  : chain::script()
169 ✔
31
{
32
}
169 ✔
33

34
script::script(chain::script&& value) NOEXCEPT
×
35
  : chain::script(std::move(value))
×
36
{
37
}
×
38

39
script::script(const chain::script& value) NOEXCEPT
×
40
  : chain::script(value)
×
41
{
42
}
×
43

44
script::script(const data_chunk& value) NOEXCEPT
1 ✔
45
  : chain::script(value, false)
1 ✔
46
{
47
}
1 ✔
48

49
script::script(const std::vector<std::string>& tokens) THROWS
×
50
  : script(join(tokens))
×
51
{
52
}
×
53

54
script::script(const std::string& mnemonic)
×
55
{
56
    std::istringstream(mnemonic) >> *this;
×
57
}
×
58

59
std::istream& operator>>(std::istream& stream, script& argument) THROWS
×
60
{
61
    std::istreambuf_iterator<char> end;
×
62
    std::string mnemonic(std::istreambuf_iterator<char>(stream), end);
×
63

64
    argument = chain::script{ mnemonic };
×
65

66
    if (!argument.is_valid())
×
67
        throw istream_exception(mnemonic);
×
68

69
    return stream;
×
UNCOV
70
}
×
71

72
std::ostream& operator<<(std::ostream& stream, const script& argument) NOEXCEPT
×
73
{
74
    stream << argument.to_string(chain::flags::all_rules);
×
75
    return stream;
×
76
}
77

78
} // namespace config
79
} // namespace system
80
} // namespace libbitcoin
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc