From 255d364eb6652655e68ef78495dab455fd28da9b Mon Sep 17 00:00:00 2001 From: Domenic Date: Mon, 6 Jun 2022 00:07:14 -0400 Subject: [PATCH] Corrected segmentation fault in listing 10-17 See https://github.com/JLospinoso/ccc/issues/98#issuecomment-1073183768 --- chapter-10-testing/examples/AutoBrake.h | 1 + chapter-10-testing/examples/test_AutoBrake | Bin 19136 -> 19448 bytes .../examples/test_AutoBrake.cpp | 9 +++++---- chapter-10-testing/examples/test_capture | Bin 0 -> 19624 bytes chapter-10-testing/examples/test_capture.cpp | 10 ++++++++++ 5 files changed, 16 insertions(+), 4 deletions(-) create mode 100755 chapter-10-testing/examples/test_capture create mode 100644 chapter-10-testing/examples/test_capture.cpp diff --git a/chapter-10-testing/examples/AutoBrake.h b/chapter-10-testing/examples/AutoBrake.h index 5ce2ef4..190c377 100644 --- a/chapter-10-testing/examples/AutoBrake.h +++ b/chapter-10-testing/examples/AutoBrake.h @@ -1,6 +1,7 @@ // AutoBrake class template #pragma once +#include #include #include "AutoBrakePods.h" diff --git a/chapter-10-testing/examples/test_AutoBrake b/chapter-10-testing/examples/test_AutoBrake index b526b79c4c9ebc3e09e0b783491845940eda838e..5e6ada8900f42e265d03d6b0582f78747c5fc93f 100755 GIT binary patch literal 19448 zcmeHPdvsJqny(HCWE>!k!WdrCAaGDjlMW99%F-ce>aLzWy6bUR9Y=P@^{Bf?!((~uarPkVgWc7Uoz<~3q7yTy(NTJTU)}m{ zZr^mX!1&MZNonV+`hAc3>Z`g{_tw3|9ljOI3LFl>X_)vEL8T|g7>HLfUaD3Z5U;2d zqwsgCaEak47fQ_Fdkq4vk&YK+(_)1W10}su%H*Jv3|KH_4~ddqzU2D8!C@+#Mw#@A zD67hLx_G1^$CUYIeJ+D9Y;-pT0Ewwpk66WJk}ZlCXH#ysOSPZ%C|smhsq`w99#f}^ zCsU3m#e{y9%ATE;gGY&}U9U;$*=dcTCYVwkl-7Kxht8+II;Gb&)v#lyCk+I5XjHUajiO*AM+Fo=mB~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GNbZwAE?-d0!UFb-3Lme83xztuQ`cO;W@>Uf87P8-xq zbEo>9#%XTQZbofW*P7df8^-9+R2NlFb67fM3Oi}mw94#=9qOY>rT@aDneqX%Y`S{GLefc?!vZ8OGO Or`GE11ch>@4F3;LjSYJM diff --git a/chapter-10-testing/examples/test_AutoBrake.cpp b/chapter-10-testing/examples/test_AutoBrake.cpp index e40a993..f005169 100644 --- a/chapter-10-testing/examples/test_AutoBrake.cpp +++ b/chapter-10-testing/examples/test_AutoBrake.cpp @@ -1,6 +1,7 @@ // Autobrake unit tests #include +#include #include #include "AutoBrake.h" @@ -45,11 +46,11 @@ void speed_is_saved() { void alert_when_imminent() { int brake_commands_published{}; - AutoBrake auto_brake{ - [&brake_commands_published](const BrakeCommand&) { + auto count_brake_commands = + [&brake_commands_published](const BrakeCommand) { brake_commands_published++; - } - }; + }; + AutoBrake auto_brake{ count_brake_commands }; auto_brake.set_collision_threshold_s(10L); auto_brake.observe(SpeedUpdate{ 100L }); auto_brake.observe(CarDetected{ 100L, 0L}); diff --git a/chapter-10-testing/examples/test_capture b/chapter-10-testing/examples/test_capture new file mode 100755 index 0000000000000000000000000000000000000000..d002dd7d38d3f25a9ae6fecd582619898da27504 GIT binary patch literal 19624 zcmeHPdvILUc|R*ZNiY@|6UCn-rBM$_)}?MpqqYKtifU zEx_N)lwZw7dA7z3KV%5FCLJp)r1Ke{1xk7qlqo_lHLwyY9ug(JQmOJh!x5^u9i%sh zSX}nfm*yEgp~83S^BcbM(BEjIN(puAQEaxaGJ4zB7t%3~i_;kPi(t|lWW7Pw6I#xC zLM5IQ6Z+L~JiW9MJW4{ndR?sNrFBM438gwHwY+A>KT3T~tmpS@Gs;V^pnxL@mHKXj z9>wK@Ch6v8uCG)-e4XPdl&e?QcPHD|R$t#8U)7yV<@#6k*Q{N&wmOha2dcCSi(Ozv?-VwBaFkS$_7nY>=Ex`=9Bz`_y26opZ~+h?tHgq&bOB>TJgpMk8iU{hWsWS zlA%QQ*hO8Y`~v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