Please send questions to
st10@humboldt.edu .
//---------------------------------------------------------------
// File: test_findMax.cpp
// Name: Sharon M. Tuttle
// last modified: 3-8-04
//
// Purpose: tester for template function findMax
//--------------------------------------------------------------
#include <cstdlib> // for EXIT_SUCCESS
#include <iostream> // for cout
#include <string> // for string type
#include "findMax.template"
using namespace std;
int main()
{
// set-up declarations
string s1 = "pork";
string s2 = "beans";
// tests and associated cout's
cout << endl;
cout << "Testing template function findMax..." << endl;
cout << endl;
cout << "1's mean test passed, 0's mean test failed:" << endl;
cout << "-------------------------------------------" << endl;
cout << (findMax(5, 10) == 10) << endl;
cout << (findMax(2.7, 1.5) == 2.7) << endl;
cout << (findMax(3, 3) == 3) << endl;
cout << (findMax(s1, s2) == "pork") << endl;
return EXIT_SUCCESS;
}