// This is the CPP file you will edit and turn in.
// Also remove these comments here and add your own.
// TODO: remove this comment header

#include <cctype>
#include <cmath>
#include <fstream>
#include <iostream>
#include <string>
#include "console.h"
#include "testing/SimpleTest.h"
#include "filelib.h"
#include "simpio.h"
#include "queue.h"
#include "map.h"
#include "random.h"

using namespace std;

// prototypes (you add more here)
Map<Vector<string>, Vector<string>> createMapFromFile(ifstream & stream, int const & n);


int main() {
    if (runSimpleTests(SELECTED_TESTS)) {
        return 0;
    }
    // TODO: Finish the program!

    cout << "Exiting." << endl;
    return 0;
}

/* You should put a good function comment here */
Map<Vector<string>, Vector<string>> createMapFromFile(ifstream & stream, int const & n) {
    Map<Vector<string>, Vector<string>> wordMap;
    // TODO: Write this function

    return wordMap;
}

PROVIDED_TEST("Teting tiny.txt with N of 3") {
    ifstream ifs;
    openFile(ifs, "res/tiny.txt");
    Map<Vector<string>, Vector<string>> wordMapSolution = {
        {{"to", "be"},{"or", "just", "or"}},
        {{"be", "or"},{"not", "not"}},
        {{"or", "not"},{"to", "okay"}},
        {{"not", "to"},{"be"}},
        {{"be", "just"},{"be"}},
        {{"just", "be"},{"who"}},
        {{"be", "who"},{"you"}},
        {{"who", "you"},{"want"}},
        {{"you", "want"},{"to", "okay"}},
        {{"want", "to"},{"be"}},
        {{"not", "okay"},{"you"}},
        {{"okay", "you"},{"want"}},
        {{"want", "okay"},{"to"}},
        {{"okay", "to"},{"be"}},
    };

    Map<Vector<string>, Vector<string>> wordMap = createMapFromFile(ifs, 3);
    EXPECT_EQUAL(wordMapSolution, wordMap);
}
