Skip to content

Commit

Permalink
fix changed file path in docs (#3435)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrsettgast authored Nov 10, 2024
1 parent ef14215 commit c70e8c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/docs/sphinx/developerGuide/Contributing/UnitTests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ GEOS Specific Recommendations

An informative example is ``testSinglePhaseBaseKernels`` which tests the single phase flow mobility and accumulation kernels on a variety of inputs.

.. literalinclude:: ../../../../coreComponents/unitTests/fluidFlowTests/testSinglePhaseBaseKernels.cpp
.. literalinclude:: ../../../../coreComponents/unitTests/fluidFlowTests/testSinglePhaseMobilityKernel.cpp
:language: c++
:start-after: // Sphinx start after test mobility
:end-before: // Sphinx end before test mobility

*[Source: coreComponents/physicsSolvers/fluidFlow/unitTests/testSinglePhaseBaseKernels.cpp]*
*[Source: coreComponents/physicsSolvers/fluidFlow/unitTests/testSinglePhaseMobilityKernel.cpp]*

What makes this such a good test is that it depends on very little other than kernels themselves. There is no need to involve the data repository or parse an XML file. Sometimes however this is not possible, or at least not without a significant duplication of code. In this case it is better to embed the XML file into the test source as a string instead of creating a separate XML file and passing it to the test as a command line argument or hard coding the path. One example of this is ``testLaplaceFEM`` which tests the laplacian solver. The embedded XML is shown below.

Expand Down

0 comments on commit c70e8c0

Please sign in to comment.