ddnet/src/test/os.cpp
bors[bot] 648dc9e032
Merge #6429
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>
2023-05-14 09:24:54 +00:00

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, "");
}