mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
648dc9e032
6429: Minor refactoring of `os_version_str` r=edg-l a=Robyt3 ## Checklist - [X] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Robert Müller <robytemueller@gmail.com>
19 lines
318 B
C++
19 lines
318 B
C++
#include "test.h"
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <base/system.h>
|
|
|
|
TEST(Os, VersionStr)
|
|
{
|
|
char aVersion[128];
|
|
ASSERT_TRUE(os_version_str(aVersion, sizeof(aVersion)));
|
|
EXPECT_STRNE(aVersion, "");
|
|
}
|
|
|
|
TEST(Os, LocaleStr)
|
|
{
|
|
char aLocale[128];
|
|
os_locale_str(aLocale, sizeof(aLocale));
|
|
EXPECT_STRNE(aLocale, "");
|
|
}
|