Commit ea0ac96e authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Merge branch 'lab4bugFixes' into 'master'

fixed issues regarding makefile and tests

See merge request !13
parents 369c91c9 7c546f7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ class labFour_pZero_Instructor;
 *  labFour_pOne_Rhombus rh1({1, 1}, 1, 45); // area sqrt(2)/2, perimeter 4
 *  labFour_pOne_Circle c1({0, 0}, 1); // area pi, perimeter 2*pi
 *
 *  vector<labFour_pOne_GeometricThing *> things = {&re1, &s1, &rh1, &c1};
 *  vector<labFour_pOne_GeometricThing *> things = {&q1, &re1, &s1, &rh1, &c1};
 *
 *  labFour_pOne_GeometricThing::sumAreas(things);      // returns 1+2+9+sqrt(2)/2+pi = 15.8487...
 *  labFour_pOne_GeometricThing::sumPerimeters(things); // returns 4+6+12+4+2*pi = 32.2832...
+8 −8
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ bool test_labFour_pOne(){
    labFour_pOne_Rhombus rh1({1, 1}, 1, 45); // area sqrt(2)/2, perimeter 4
    labFour_pOne_Circle c1({0, 0}, 1); // area pi, perimeter 2*pi

    vector<labFour_pOne_GeometricThing *> things = {&re1, &s1, &rh1, &c1};
    vector<labFour_pOne_GeometricThing *> things = {&q1, &re1, &s1, &rh1, &c1};

    if(q1.getArea() != 1){
        cout << "Test 1a failed" << endl;
@@ -212,18 +212,18 @@ bool test_labFour_pThree(){
    float fib1 = labFour_pThree_genFib({1, 0, 1}, 4);
    float fib2 = labFour_pThree_genFib({0.25, 0.25 ,0.5, 0.5}, 3);

    if((fib0 >= 7.99) && (fib0 <= 8.01)){
    if((fib0 <= 7.99) || (fib0 >= 8.01)){
        cout << "Test 3a failed" << endl;
        return false;
    }

    if((fib1 >= 8.99) && (fib1 <= 9.01)){
    if((fib1 <= 8.99) || (fib1 >= 9.01)){
        cout << "Test 3b failed" << endl;
        return false;
    }


    if( (fib2 >= 2.562) && (fib2 <= 2.563)){
    cout << fib2 << endl;
    if( (fib2 <= 2.562) || (fib2 >= 2.563)){
        cout << "Test 3c failed" << endl;
        return false;
    }
+2 −2
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ LAB0_SRCS = LabZero.cpp lab0.cpp $(COMMON_SRCS)
LAB1_SRCS = LabOne.cpp lab1.cpp $(COMMON_SRCS)
LAB2_SRCS = LabTwo.cpp lab2.cpp
LAB3_SRCS = LabThree.cpp
LAB4_SRCS = LabFour.cpp
LAB4_SRCS = LabFour.cpp $(COMMON_SRCS)

# Object files
COMM_OBJS = Support/Common.o
@@ -18,7 +18,7 @@ LAB0_OBJS = LabZero.o lab0.o $(COMM_OBJS)
LAB1_OBJS = LabOne.o lab1.o $(COMM_OBJS)
LAB2_OBJS = LabTwo.o lab2.o
LAB3_OBJS = LabThree.o
LAB4_OBJS = LabFour.o
LAB4_OBJS = LabFour.o $(COMM_OBJS)
OBJS = $(COMM_OBJS) $(LAB0_OBJS) $(LAB1_OBJS) $(LAB2_OBJS) $(LAB3_OBJS) $(LAB4_OBJS)

# Executable names