1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 11:53:53 +00:00

Merge remote-tracking branch 'scrawl/master'

This commit is contained in:
Marc Zinnschlag 2014-04-21 18:10:38 +02:00
commit 6ecee55209

View file

@ -1,33 +0,0 @@
#include <gtest/gtest.h>
#include "components/misc/slice_array.hpp"
struct SliceArrayTest : public ::testing::Test
{
protected:
virtual void SetUp()
{
}
virtual void TearDown()
{
}
};
TEST_F(SliceArrayTest, hello_string)
{
Misc::SString s("hello");
ASSERT_EQ(sizeof("hello") - 1, s.length);
ASSERT_FALSE(s=="hel");
ASSERT_FALSE(s=="hell");
ASSERT_TRUE(s=="hello");
}
TEST_F(SliceArrayTest, othello_string_with_offset_2_and_size_4)
{
Misc::SString s("othello" + 2, 4);
ASSERT_EQ(sizeof("hell") - 1, s.length);
ASSERT_FALSE(s=="hel");
ASSERT_TRUE(s=="hell");
ASSERT_FALSE(s=="hello");
}