38TEST_CASE(
"Test 00 Platform Info - os_and_arch",
"[endian][abi][cpu][os]" ) {
42TEST_CASE(
"Test 01 OS CPU ABI ENDIAN - os_and_arch",
"[endian][abi][cpu][os]" ) {
48 std::cout <<
"CpuInfo: " << cpu.
toString() << std::endl;
52 std::cout <<
"- os_and_arch " << os_and_arch << std::endl << std::endl;
55 REQUIRE( std::string::npos == os_and_arch.find(
"undef") );
64 std::cout <<
"User-Current: " << uinfo.
toString() << std::endl;
65 REQUIRE(
true == uinfo.
isValid() );
69 std::cout <<
"User 'root': " << uinfo.
toString() << std::endl;
Singleton CpuInfo caching all jau::cpu information.
static const CpuInfo & get() noexcept
Returns reference to const singleton instance.
cpu_family_t family
cpu_family_t derived from Architectures predefined compiler macros.
std::string toString(std::string &sb, bool details_only=false) const noexcept
User account information of the underlying OS.
bool isValid() const noexcept
std::string toString() const noexcept
constexpr bool is_defined_endian(const endian_t &v) noexcept
Evaluates true if the given endian is defined, i.e.
constexpr bool is_little_or_big_endian() noexcept
Evaluates true if platform is running in little or big endian mode, i.e.
endian_t
Endian identifier, indicating endianess of all scalar types.
@ native
Identifier for native platform type, one of the above.
constexpr bool is_defined_os_type(const os_type_t v) noexcept
Evaluates true if the given os_type is defined, i.e.
os_type_t
OS type bits and unique IDs.
constexpr abi_type_t get_abi_type(const jau::cpu::cpu_family_t cpu) noexcept
std::string get_os_and_arch(const os_type_t os, const jau::cpu::cpu_family_t cpu, const abi_type_t abi, const endian_t e) noexcept
Returns the common name for the given os_type, jau::cpu::cpu_family, abi_type and endian.
std::string to_string(const os_type_t mask) noexcept
Return the string representation of os_type.
std::string get_platform_info(std::string &sb) noexcept
@ native
Identifier for native OS type, one of the above.
TEST_CASE("Test 00 Platform Info - os_and_arch", "[endian][abi][cpu][os]")