Missing files in lasagna-master?

I did the exercise in the online editor and when I clicked submit, I got the not-very-helpful message

make: *** No targets specified and no makefile found.  Stop.

So I downloaded it and ran cmake ., only to be told

CMake Warning:
  Ignoring extra path from command line:

   "."

There is no CMakeList.txt file, so I copied one from another exercise. This revealed that there is also no test directory.

1 Like

Thanks for the report, I will check what happened. Here is the PR to fix this.

@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.

Thanks for the testing, I had planned to do it that way, but it slipped through.

1 Like

Thanks, all is well now.

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.

1 Like

Should be fixed, thanks for reporting.