/* stats_tests.cpp** Unit tests for the simple statistics library** EECS 280 Project 1** Protip #1: Write tests for the functions BEFORE you implement them! For* example, write tests for median() first, and then write median(). It sounds* like a pain, but it helps make sure that you are never under the illusion* that your code works when it's actually full of bugs.** Protip #2: Instead of putting
...[Show More]
/* stats_tests.cpp
*
* Unit tests for the simple statistics library
*
* EECS 280 Project 1
*
* Protip #1: Write tests for the functions BEFORE you implement them! For
* example, write tests for median() first, and then write median(). It sounds
* like a pain, but it helps make sure that you are never under the illusion
* that your code works when it's actually full of bugs.
*
* Protip #2: Instead of putting all your tests in main(), put each test case
* in a function!
*/
#include "stats.h"
#include <iostream>
#include <cassert>
#include <vector>
#include <cmath>
using namespace std;
void test_sum_small_data_set();
// Add prototypes for you test functions here.
void test_summarize();
void test_count();
void test_sum();
void test_mean();
void test_even_median();
void test_odd_median();
void test_mode_with_no_tie();
void test_mode_with_tie();
void test_min();
void test_max();
void test_stdev();
void test_percentile();
int main() {
//test_sum_small_data_set();
// Call your test functions here
test_summarize();
test_count();
test_sum();
test_mean();
test_even_median();
test_odd_median();
test_mode_with_no_tie();
test_mode_with_tie();
test_min();
[Show Less]