1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <sal/types.h>
11 #include <cppunit/TestFixture.h>
12 #include <cppunit/extensions/HelperMacros.h>
13 #include "rtl/ustring.hxx"
15 namespace test
{ namespace oustring
{
17 class StartsWith
: public CppUnit::TestFixture
22 CPPUNIT_TEST_SUITE(StartsWith
);
23 CPPUNIT_TEST(startsWith
);
24 CPPUNIT_TEST_SUITE_END();
29 CPPUNIT_TEST_SUITE_REGISTRATION(test::oustring::StartsWith
);
31 void test::oustring::StartsWith::startsWith()
33 CPPUNIT_ASSERT( rtl::OUString( "foobar" ).startsWith( "foo" ));
34 CPPUNIT_ASSERT( !rtl::OUString( "foo" ).startsWith( "foobar" ));
35 CPPUNIT_ASSERT( !rtl::OUString( "foobar" ).startsWith( "oo" ));
38 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */