tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sal / qa / rtl / strings / test_oustring_startswith.cxx
blobe27310b82461a5a5dcc366e2ec0988b58996e838
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #include <cppunit/TestFixture.h>
11 #include <cppunit/extensions/HelperMacros.h>
12 #include <rtl/ustring.hxx>
14 namespace test::oustring {
16 class StartsWith: public CppUnit::TestFixture
18 private:
19 void startsWith();
21 CPPUNIT_TEST_SUITE(StartsWith);
22 CPPUNIT_TEST(startsWith);
23 CPPUNIT_TEST_SUITE_END();
28 CPPUNIT_TEST_SUITE_REGISTRATION(test::oustring::StartsWith);
30 void test::oustring::StartsWith::startsWith()
32 CPPUNIT_ASSERT( u"foobar"_ustr.startsWith( "foo" ));
33 CPPUNIT_ASSERT( !u"foo"_ustr.startsWith( "foobar" ));
34 CPPUNIT_ASSERT( !u"foobar"_ustr.startsWith( "oo" ));
37 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */