From a6518d03eaa7c2d2961de16118f35e37f92d0e30 Mon Sep 17 00:00:00 2001 From: Paul Sharp <44529197+DrPaulSharp@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:01:27 +0100 Subject: [PATCH] Adds test for running RAT without any layers --- .../testReflectivityCalculations.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/nonPolarisedTFReflectivityCalculation/testReflectivityCalculations.m b/tests/nonPolarisedTFReflectivityCalculation/testReflectivityCalculations.m index e8291b133..a5f370793 100644 --- a/tests/nonPolarisedTFReflectivityCalculation/testReflectivityCalculations.m +++ b/tests/nonPolarisedTFReflectivityCalculation/testReflectivityCalculations.m @@ -119,6 +119,19 @@ function loadTFParams(testCase, TFFile) methods (Test, ParameterCombination='exhaustive') %% Test High Level RAT Routines + function testRATEmpty(testCase) + % Test that RAT runs for a project without any layers. + emptyProject = projectClass(); + emptyProject.addContrast('data', 'Simulation',... + 'background', 'Background 1',... + 'bulkIn', 'SLD Air',... + 'bulkOut', 'SLD D2O',... + 'scalefactor', 'Scalefactor 1',... + 'resolution', 'Resolution 1'); + + [~, ~] = RAT(emptyProject,testCase.controlsInput); + end + function testRAT(testCase) [projectOutput, result] = RAT(testCase.project,testCase.controlsInput);