Skip to content

Commit

Permalink
Merge pull request #165 from snitch-org/print
Browse files Browse the repository at this point in the history
Don't hard-code stdout_print in terminate_with()
  • Loading branch information
cschreib committed May 9, 2024
2 parents f7a0ec2 + 03b21d9 commit 86d18cb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.14)

project(snitch LANGUAGES CXX VERSION 1.2.4)
project(snitch LANGUAGES CXX VERSION 1.2.5)

# Maximum lengths.
set(SNITCH_MAX_TEST_CASES 5000 CACHE STRING "Maximum number of test cases in a test application.")
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project('snitch', 'cpp',
default_options: ['cpp_std=c++20', 'default_library=static'],
version: '1.2.4'
version: '1.2.5'
)

cpp_arguments = []
Expand Down
8 changes: 4 additions & 4 deletions src/snitch_error_handling.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "snitch/snitch_error_handling.hpp"

#include "snitch/snitch_console.hpp"
#include "snitch/snitch_cli.hpp"

#include <exception> // for std::terminate

namespace snitch {
[[noreturn]] void terminate_with(std::string_view msg) noexcept {
impl::stdout_print("terminate called with message: ");
impl::stdout_print(msg);
impl::stdout_print("\n");
cli::console_print("terminate called with message: ");
cli::console_print(msg);
cli::console_print("\n");

std::terminate();
}
Expand Down
2 changes: 1 addition & 1 deletion src/snitch_reporter_teamcity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ constexpr std::size_t max_duration_length = 32;
# if SNITCH_WITH_TIMINGS
small_string<max_duration_length> make_duration(float duration) noexcept {
small_string<max_duration_length> string;
append_or_truncate(string, static_cast<std::size_t>(duration * 1e6));
append_or_truncate(string, static_cast<std::size_t>(duration * 1e6f));
return string;
}
# endif
Expand Down

0 comments on commit 86d18cb

Please sign in to comment.