ソース情報
- リポジトリ
- llnl/smith
- ソースの最終更新活動
- 2026年3月10日 22:54
- 検出された SKILL.md の言語
- 英語
- スター
- 244
- フォーク
- 36
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
SOC 職業分類に基づく
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/llnl/smith --skill cpp-unit-testingコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
| name | cpp-unit-testing |
| description | Instructions for creating unit tests for Smith |
This repo’s unit tests:
TEST, TEST_F, etc.).tests/ subdirectory.smith_add_tests(...).Place unit tests next to the component they cover:
src/smith/<component>/tests/ (recommended for library code)src/tests/ (project-wide smoke/regression tests)Each tests/ directory should contain:
*.cpp test filesCMakeLists.txt that registers those tests with smith_add_testsAlso ensure the parent component adds the tests subdirectory when tests are enabled:
if(SMITH_ENABLE_TESTS)
add_subdirectory(tests)
endif()
#include <gtest/gtest.h>TEST_F) when setup/teardown is shared.smith_add_testssmith_add_tests creates one test executable per source file and registers it with CTest.
The executable/test name is the source basename (e.g., test_state_manager.cpp → test_state_manager).
Minimal tests/CMakeLists.txt template:
set(my_component_test_depends
smith_my_component
gtest)
set(my_component_test_sources
test_feature_a.cpp
test_feature_b.cpp)
smith_add_tests(SOURCES ${my_component_test_sources}
DEPENDS_ON ${my_component_test_depends}
NUM_MPI_TASKS 1)
Notes:
DEPENDS_ON (the library under test + gtest + any required Smith/TPL targets).If a test requires MPI, add the MPI dependency and set NUM_MPI_TASKS:
smith_add_tests(SOURCES my_parallel_test.cpp
DEPENDS_ON gtest blt::mpi smith_my_component
NUM_MPI_TASKS 4)
If a test requires OpenMP, set NUM_OMP_THREADS accordingly.
If you need a CUDA-enabled unit test, gate it behind SMITH_ENABLE_CUDA and pass USE_CUDA:
if(SMITH_ENABLE_CUDA)
smith_add_tests(SOURCES my_cuda_test.cpp
DEPENDS_ON gtest smith_my_component
USE_CUDA TRUE)
endif()
-DENABLE_TESTS=ON -DSMITH_ENABLE_TESTS=ONctestctest -R test_state_managercmake/SmithMacros.cmakesrc/smith/physics/state/tests/CMakeLists.txtsrc/tests/CMakeLists.txt