MCPcopy Create free account
hub / github.com/jerryuhoo/Fire / findProjectRoot

Function findProjectRoot

tests/RegressionTests.cpp:19–25  ·  view source on GitHub ↗

* @brief Finds the project root directory by navigating up from the executable's location. * * This function assumes a standard project structure where the test executable is located in a build directory * (e.g., build/tests/Debug). * @return juce::File object pointing to the project root directory. */

Source from the content-addressed store, hash-verified

17 * @return juce::File object pointing to the project root directory.
18 */
19 juce::File findProjectRoot()
20 {
21 auto executableFile = juce::File::getSpecialLocation(juce::File::currentApplicationFile);
22 auto projectRoot = executableFile.getParentDirectory().getParentDirectory();
23 jassert(projectRoot.getChildFile("tests").isDirectory()); // Assert that we found the correct directory
24 return projectRoot;
25 }
26
27 /**
28 * @brief Generates an AudioBuffer containing a sine wave.

Callers 2

runTestForPresetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected