From ea905323a54029d4205cd4255338d5a7d490a51e Mon Sep 17 00:00:00 2001 From: Henry Huang <69825683+hhenry01@users.noreply.github.com> Date: Sat, 2 Sep 2023 13:06:34 -0700 Subject: [PATCH] Add C++ unit testing (#58) * Add ROS Node attach and CPP unit test extension * rebase to latest devcontainer --- .devcontainer/config/sailbot_workspace.code-workspace | 11 +++++++++++ .devcontainer/devcontainer.json | 1 + 2 files changed, 12 insertions(+) diff --git a/.devcontainer/config/sailbot_workspace.code-workspace b/.devcontainer/config/sailbot_workspace.code-workspace index 78d735fde..a2645ab36 100644 --- a/.devcontainer/config/sailbot_workspace.code-workspace +++ b/.devcontainer/config/sailbot_workspace.code-workspace @@ -173,6 +173,17 @@ "editor.rulers": [120], }, + "testMate.cpp.discovery.loadOnStartup": true, + // The following setting just changes the default prelaunch task from "build" to "debug" + "testMate.cpp.test.advancedExecutables": [ + { + "pattern": "{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*", + "runTask": { + "before": [ "debug" ] + } + } + ], + // markdown // copied from docs: https://github.com/UBCSailbot/docs/blob/main/.vscode/settings.json "[markdown]": { diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f7e984053..b446a3eef 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -60,6 +60,7 @@ "jeff-hykin.better-cpp-syntax", "KevinRose.vsc-python-indent", "llvm-vs-code-extensions.vscode-clangd", + "matepek.vscode-catch2-test-adapter", "mongodb.mongodb-vscode", "ms-iot.vscode-ros", "ms-python.black-formatter",