jeudi 26 mai 2016

How do I create a unit test where the answer needs to be rounded up?

Using google test library I'm writing a Unit test. After I compile it I receive an error that says:

"Error: elevation which is:10 to be equal to:Z which is 9.999999999999999325"

How can I round up Z so the test can pass and be equal to 10?

Aucun commentaire:

Enregistrer un commentaire