31
|
1 |
|
|
2 |
// STLport regression testsuite component.
|
|
3 |
// To compile as a separate example, please #define MAIN.
|
|
4 |
|
|
5 |
#include <algorithm>
|
|
6 |
#include <iostream>
|
|
7 |
#include <cstdlib>
|
|
8 |
|
|
9 |
#include "fadapter.h"
|
|
10 |
|
|
11 |
#ifdef MAIN
|
|
12 |
#define gener1_test main
|
|
13 |
#endif
|
|
14 |
|
|
15 |
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
|
16 |
using namespace std;
|
|
17 |
#endif
|
|
18 |
|
|
19 |
static int cxxrand() { return rand();}
|
|
20 |
|
|
21 |
int gener1_test(int, char**)
|
|
22 |
{
|
|
23 |
cout<<"Results of gener1_test:"<<endl;
|
|
24 |
int numbers[10];
|
|
25 |
#if defined(__MVS__)
|
|
26 |
generate(numbers, numbers + 10, ptr_gen(cxxrand));
|
|
27 |
#else
|
|
28 |
generate(numbers, numbers + 10, cxxrand);
|
|
29 |
#endif
|
|
30 |
|
|
31 |
for(int i = 0; i < 10; i++)
|
|
32 |
cout << numbers[i] << ' ';
|
|
33 |
cout << endl;
|
|
34 |
return 0;
|
|
35 |
}
|