Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 #include "cppunit/cppunit_proxy.h"
22 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
29 class PairTest : public CPPUNIT_NS::TestCase
31 CPPUNIT_TEST_SUITE(PairTest);
33 CPPUNIT_TEST(pair_cov);
34 CPPUNIT_TEST_SUITE_END();
41 CPPUNIT_TEST_SUITE_REGISTRATION(PairTest);
44 // tests implementation
46 void PairTest::pair0()
48 pair<int, int> p = make_pair(1, 10);
50 CPPUNIT_ASSERT(p.first==1);
51 CPPUNIT_ASSERT(p.second==10);
53 void PairTest::pair_cov()
55 pair<int, int> p1 = make_pair(1, 10);
56 pair<int, int> p2 = make_pair(2, 10);
60 CPPUNIT_ASSERT(val == false);
62 CPPUNIT_ASSERT(val == false);
64 CPPUNIT_ASSERT(val == true);
66 CPPUNIT_ASSERT(val == true);
68 CPPUNIT_ASSERT(val == true);
70 CPPUNIT_ASSERT(val == false);