@vaeng Hi, it seems there might be something wrong with the checks for the scaleRecipe function in this exercise.

I submitted a solution which doesn’t scale correctly the quantities. I multiplied the factor given in the function with the original quantity, without dividing the result by 2. However, my solution passed all the tests.

After some testing and checking the code in lasagna_master_test.cpp, the problem seems to be in REQUIRE_VECTOR_APROX_EQUAL.

It is defined to return true if vec1.at(i) - vec2.at(i) < margin for every i in the range, but it means the test always passes if vec2.at(i) is higher than it should be (the subtraction results in a negative number).

Using absolute value for the subtraction should solve it.

I noticed that the instructions for the family secret function are a bit off:

Implement another version of the addSecretIngredient function that accepts two arguments: a const reference to a vector representing the friend's list of ingredients and a single string

The first argument should be a non-const reference to your own ingredients.