equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // STLport regression testsuite component. |
|
20 // To compile as a separate example, please #define MAIN. |
|
21 |
|
22 #include <vector> |
|
23 #include <algorithm> |
|
24 #include <iostream> |
|
25 |
|
26 #ifdef MAIN |
|
27 #define filln1_test main |
|
28 #endif |
|
29 |
|
30 #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES) |
|
31 using namespace std; |
|
32 #endif |
|
33 int filln1_test(int, char**) |
|
34 { |
|
35 cout<<"Results of filln1_test:"<<endl; |
|
36 vector <int> v(10); |
|
37 fill_n(v.begin(), v.size(), 42); |
|
38 int failures = 0; |
|
39 for(int i = 0; i < 10; i++) |
|
40 { |
|
41 cout << v[i] << ' '; |
|
42 if(v[i] != 42) |
|
43 failures++; |
|
44 } |
|
45 cout << endl; |
|
46 |
|
47 if(!failures) |
|
48 return 0; |
|
49 else |
|
50 return 1; |
|
51 |
|
52 } |