Commit 894e20da authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Minor fixes

parent 7fd0b7a4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -55,5 +55,3 @@ int *labThree_pZero(string filename);
 * line with the most fields ("a", "b", "c", "d").
 */
int labThree_pOne(string filenameCSV);
 No newline at end of file

// CHAPTER 9
+12 −12
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@

using namespace std;

bool test_labOne_pZero() {
bool test_labTwo_pZero() {
    // simple, but incomplete tests

    int arr0 [] = {1,2,3};
@@ -34,7 +34,7 @@ bool test_labOne_pZero() {
    return true;
}

bool test_labOne_pOne() {
bool test_labTwo_pOne() {
    

    int A0[] = {1,4,9,16,9,7,4,9,11};
@@ -57,7 +57,7 @@ bool test_labOne_pOne() {
    return true;
}

bool test_labOne_pTwo() {
bool test_labTwo_pTwo() {
    
    int arr0[] = {1,2,3,5};
    int arr1[] = {2,7,6,9,5,1,4,3,8};
@@ -83,7 +83,7 @@ bool test_labOne_pTwo() {
    return true;
}

bool test_labOne_pThree() {
bool test_labTwo_pThree() {
    
    double arr0[] = {1,5,3,2};
    double arr1[] = {3,1,4,1,5,9,2,6,5,3,5,6};
@@ -106,7 +106,7 @@ bool test_labOne_pThree() {
    return true;
}

bool test_labOne_pFour() {
bool test_labTwo_pFour() {

    char *result0;
    const char arr00[] = {'H','e','l','l','o','\0'};
@@ -134,7 +134,7 @@ bool test_labOne_pFour() {
    return true;
}

bool test_labOne_pFive() {
bool test_labTwo_pFive() {

    const char *src0 = "Hatty";
    const char *seek0 = "t";
@@ -177,12 +177,12 @@ bool test_labOne_pFive() {


int main() {
    bool t0 = test_labOne_pZero();
    bool t1 = test_labOne_pOne();
    bool t2 = test_labOne_pTwo();
    bool t3 = test_labOne_pThree();
    bool t4 = test_labOne_pFour();
    bool t5 = test_labOne_pFive();
    bool t0 = test_labTwo_pZero();
    bool t1 = test_labTwo_pOne();
    bool t2 = test_labTwo_pTwo();
    bool t3 = test_labTwo_pThree();
    bool t4 = test_labTwo_pFour();
    bool t5 = test_labTwo_pFive();

    cout << "pZero: " << (t0 ? "passed" : "failed") << endl;
    cout << "pOne: " << (t1 ? "passed" : "failed") << endl;