chassis: replace lambda with inline functions
It has been a convention that request route functions take inline
functions instead of lambdas. The benifets include less indents,
beging more readable + unit test-able (take a look at the unit test that
this commit adds for example).
This commit also fixed neccessary headers to make the test compile. The
headers of the unit test source is a complete list. But headers of the
core codes are not complete. These header clean up will be done in a
separate effort once https://gerrit.openbmc.org/c/openbmc/bmcweb/+/55138
is submitted.
Tested:
1. no service validator errors on real hardware.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I4b23ba54707cea947b5db771c72aa64899041511
diff --git a/meson.build b/meson.build
index 54cd92a..7be259b 100644
--- a/meson.build
+++ b/meson.build
@@ -393,6 +393,7 @@
'include/ut/openbmc_dbus_rest_test.cpp',
'redfish-core/include/utils/query_param_test.cpp',
'redfish-core/lib/ut/service_root_test.cpp',
+ 'redfish-core/lib/chassis_test.cpp',
'redfish-core/ut/configfile_test.cpp',
'redfish-core/ut/hex_utils_test.cpp',
'redfish-core/ut/ip_utils_test.cpp',