Hello,
I try to prepare a test where SIM_PLOT_FRAME() will be used.
Constructor of this frame requires Kiway, and I stumbled upon
a problem I cannot solve on my own. Could you please answer answer to
my questions, so I could move on?
1. There is a Kiway object used in mocks_eeschema.cpp, in
PGM_MOCK_EESCHEMA_FRAME::OnPgmExit(). Code compiles fine.
2. I try to use Kiway in test_sch_sheet.cpp, but linking fails
(undefined reference to KIWAY Kiway object).
3. It gets linked again when Kiway will be defined in
test_sch_sheet.cpp (can be added in mocks_eeschema.cpp as well).
Diff with my changes is attached.
My questions are following:
- why linker doesn't complain in mocks_eeschema.cpp but does in
test_sch_sheet.cpp?
- why Pgm() or Kiface() can be accessed using function (therefore it
is easy to mock them), and Kiway is a static object?
Best regards,
Sylwester