mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Corresponding code changes
This commit is contained in:
parent
781c7a800f
commit
ae4cd1ebf1
14 changed files with 60 additions and 55 deletions
|
@ -1,8 +1,8 @@
|
|||
# catch2 is distributed as a standalone header.
|
||||
# catch2 is distributed as a standalone header / source amalgamation.
|
||||
#
|
||||
# Downloaded from:
|
||||
#
|
||||
# https://github.com/catchorg/Catch2/releases/download/v2.13.9/catch.hpp
|
||||
# https://github.com/catchorg/Catch2/releases/tag/v3.6.0
|
||||
#
|
||||
# The following changes were made to always print in microseconds, fixed format:
|
||||
#
|
||||
|
@ -12,6 +12,7 @@
|
|||
# - return os << duration.value() << ' ' << duration.unitsAsString();
|
||||
# + return os << std::fixed << duration.value() << ' ' << duration.unitsAsString();
|
||||
|
||||
add_library(catch2 INTERFACE)
|
||||
add_library(catch2 STATIC catch_amalgamated.cpp)
|
||||
target_compile_definitions(catch2 PRIVATE CATCH_CONFIG_NOSTDOUT CATCH_AMALGAMATED_CUSTOM_MAIN)
|
||||
add_library(Catch2::Catch2 ALIAS catch2)
|
||||
target_include_directories(catch2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
|
|
@ -8952,7 +8952,7 @@ class Duration {
|
|||
Unit m_units;
|
||||
|
||||
public:
|
||||
explicit Duration(double inNanoseconds, Unit units = Unit::Auto)
|
||||
explicit Duration(double inNanoseconds, Unit units = Unit::Microseconds)
|
||||
: m_inNanoseconds(inNanoseconds),
|
||||
m_units(units) {
|
||||
if (m_units == Unit::Auto) {
|
||||
|
@ -9002,7 +9002,7 @@ public:
|
|||
|
||||
}
|
||||
friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& {
|
||||
return os << duration.value() << ' ' << duration.unitsAsString();
|
||||
return os << std::fixed << duration.value() << ' ' << duration.unitsAsString();
|
||||
}
|
||||
};
|
||||
} // end anon namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue