Skip to content

Commit fbf0b37

Browse files
authored
Merge pull request #439 from ckormanyos/qemu_and_syntax
Update qemu CI runs and syntax
2 parents 7c5abe8 + 9bf358b commit fbf0b37

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

.github/workflows/wide_integer.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,11 @@ jobs:
620620
fetch-depth: '0'
621621
- name: update-tools
622622
run: |
623-
sudo apt install libncursesw5
623+
sudo apt update
624+
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
625+
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
626+
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libncursesw5_6.3-2ubuntu0.1_amd64.deb
627+
sudo apt install ./libncursesw5_6.3-2ubuntu0.1_amd64.deb
624628
mkdir -p emu_env && cd emu_env
625629
wget --no-check-certificate https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
626630
tar -xf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz

boost/multiprecision/uintwide_t_backend.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
constexpr auto negate() -> void
251251
{
252252
m_value.negate();
253-
}
253+
} // LCOV_EXCL_LINE
254254

255255
WIDE_INTEGER_NODISCARD constexpr auto compare(const uintwide_t_backend& other_mp_cpp_backend) const -> int
256256
{
@@ -326,7 +326,7 @@
326326
constexpr auto eval_multiply(uintwide_t_backend<MyWidth2, MyLimbType, MyAllocatorType>& result, const uintwide_t_backend<MyWidth2, MyLimbType, MyAllocatorType>& x) -> void
327327
{
328328
result.representation() *= x.crepresentation();
329-
}
329+
} // LCOV_EXCL_LINE
330330

331331
template<
332332
#if defined(WIDE_INTEGER_NAMESPACE)

test/test.cpp

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
#include <iomanip>
3838
#include <iostream>
39+
#include <sstream>
3940

4041
#if !defined(BOOST_VERSION)
4142
#error BOOST_VERSION is not defined. Ensure that <boost/version.hpp> is properly included.
@@ -643,19 +644,19 @@ auto run() -> bool // NOLINT(readability-function-cognitive-complexity)
643644
const auto execution_time = stopwatch_type::elapsed_time<float>(my_stopwatch);
644645

645646
{
646-
const auto flg = std::cout.flags();
647-
648-
std::cout << "result_is_ok: "
649-
<< std::boolalpha
650-
<< result_is_ok
651-
<< ", time: "
652-
<< std::fixed
653-
<< std::setprecision(1)
654-
<< execution_time
655-
<< "s"
656-
<< std::endl;
657-
658-
std::cout.flags(flg);
647+
std::stringstream strm { };
648+
649+
strm << "result_is_ok: "
650+
<< std::boolalpha
651+
<< result_is_ok
652+
<< ", time: "
653+
<< std::fixed
654+
<< std::setprecision(1)
655+
<< execution_time
656+
<< "s"
657+
;
658+
659+
std::cout << strm.str() << std::endl;
659660
}
660661

661662
return result_is_ok;
@@ -665,9 +666,9 @@ auto run() -> bool // NOLINT(readability-function-cognitive-complexity)
665666

666667
auto main() -> int // NOLINT(bugprone-exception-escape)
667668
{
668-
const auto result_is_ok = local::run();
669+
const bool result_is_ok { local::run() };
669670

670-
const auto result_of_main = (result_is_ok ? 0 : -1);
671+
const int result_of_main { (result_is_ok ? static_cast<int>(INT8_C(0)) : static_cast<int>(INT8_C(-1))) };
671672

672673
std::cout << "result_of_main: " << result_of_main << std::endl;
673674

0 commit comments

Comments
 (0)