#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include "sum_array.h"
using namespace std;
/*--------
signature: main: void -> int
purpose: testing program for the function sum_array
examples: when run, this should output to the screen:
testing sum_array: true's should mean passed:
---------------------------------------
...followed by each testing call, hopefully
followed by true to show it passed
by: funct_play
last modified: Tue Nov 29 14:09:22 PST 2016
--------*/
int main()
{
cout << boolalpha;
cout << endl;
cout << "testing sum_array: true's should mean passed: " << endl;
cout << "---------------------------------------" << endl;
const int NUM_VALS = 5;
double my_list[NUM_VALS] = {10, 20, 3, 4, 100.1};
cout << "(sum_array(my_list, NUM_VALS) == 137.1): "
<< (sum_array(my_list, NUM_VALS) == 137.1) << endl;
cout << endl;
const int NUM_WTS = 3;
double worm_wts[NUM_WTS] = {10, 20, 30};
cout << "(sum_array(worm_wts, NUM_WTS) == 60): "
<< (sum_array(worm_wts, NUM_WTS) == 60) << endl;
cout << endl;
return EXIT_SUCCESS;
}