FilipKon13 / tests-generation

Header-only library providing convenient interface for generating test-files
0 stars 0 forks source link

examples/showcase.cpp doesn't compile, missing call operator #1

Open TFKls opened 1 week ago

TFKls commented 1 week ago

When trying to compile the showcase file, I get the following errors:

$ g++ showcase.cpp 
showcase.cpp: In function ‘int main()’:
showcase.cpp:42:19: error: no match for call to ‘(test::Testing<test::OIOIOIManager<>, Testcase>) (test::Tree)’
   42 |         t.G = test(Tree(t.n)); // using generator dedicated to particular testcase to generate random Tree
      |               ~~~~^~~~~~~~~~~
showcase.cpp:55:24: error: no match for call to ‘(test::Testing<test::OIOIOIManager<>, Testcase>) (test::Path)’
   55 |         Graph p2 = test(Path(n / 3));                      // random path
      |                    ~~~~^~~~~~~~~~~~~
showcase.cpp:64:17: error: no match for call to ‘(test::Testing<test::OIOIOIManager<>, Testcase>) (test::Tree)’
   64 |         G = test(Tree(n));
      |             ~~~~^~~~~~~~~
showcase.cpp:72:24: error: no match for call to ‘(test::Testing<test::OIOIOIManager<>, Testcase>) (test::Tree)’
   72 |         Graph p2 = test(Tree(n / 2));
      |                    ~~~~^~~~~~~~~~~~~
showcase.cpp:93:17: error: no match for call to ‘(test::Testing<test::OIOIOIManager<>, Testcase>) (test::Tree)’
   93 |         G = test(Tree(n));
      |             ~~~~^~~~~~~~~

implying that test::Testing<...> doesn't implement a call operator, which is used by the example.

This also exists when compiling via the CMake target example-showcase.

FilipKon13 commented 1 week ago

Should work now - syntax had changed and examples had not been updated. I will add compilation of examples to CI and close issue then.