Closed paraka closed 2 years ago
I finally end up making this sample properly working. The problem was because of optimizations enabled in gcc. Setting -O0 compilation flag for this sample makes all properly working.
@paraka So I guess this can be closed?
Yes, I think it can be closed. No optimizations when using gcc issue is documented in general documentation, so it is ok and also solve this concrete problem.
Hi all,
I have the following sample code:
I have tests using fakeit and catch2 for method do_some_stuff of Bar class.
The test is as follows:
As you can see I set up two mocks one to get 'true' from the method and another one to get 'false'. I have also two sections to check for invalid input of the method.
If I run this test in x86_64 bit architecture I get expected behaviour:
But when I try to run the same in aarch64 bits I get the following error:
I get this error even if I only have a simple mock declaration in the test as:
So it seems there is something wrong with catch and fakeit for aarch64 architecture.
Do you know if there are any issues related with this?
I am using fakeit v2.0.5 with catch2 2.6.1 for both x86_64 and aarch64 build it using yocto.
Running the tests of fakeit which use tpunit for aarch64 there is no problem around and behaviour is as expected.
Thanks in advance for your time.