Fix GNU C++ version check
[LibreOffice.git] / sal / qa / rtl / oustringbuffer / test_oustringbuffer_appendchar.cxx
blobf5168b60da89f8ddec1a559cfb6ff0d91a7f34b7
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 <sal/config.h>
12 #include <o3tl/cppunittraitshelper.hxx>
13 #include <sal/types.h>
14 #include <cppunit/TestFixture.h>
15 #include <cppunit/TestAssert.h>
16 #include <cppunit/extensions/HelperMacros.h>
17 #include <rtl/ustrbuf.hxx>
19 namespace test::oustringbuffer {
21 class AppendChar: public CppUnit::TestFixture {
22 private:
23 void testAppendChar();
25 CPPUNIT_TEST_SUITE(AppendChar);
26 CPPUNIT_TEST(testAppendChar);
27 CPPUNIT_TEST_SUITE_END();
30 void AppendChar::testAppendChar() {
31 // Check that append('a') does not unexpectedly pick
32 // append(sal_Int32 i, sal_Int16 radix = 10):
33 OUStringBuffer s;
34 s.append('a');
35 CPPUNIT_ASSERT_EQUAL(sal_Int32(1), s.getLength());
36 CPPUNIT_ASSERT_EQUAL(u'a', s[0]);
41 CPPUNIT_TEST_SUITE_REGISTRATION(test::oustringbuffer::AppendChar);
43 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */