From 84600a67e4efc9320e6d52c9e061f2bfff198767 Mon Sep 17 00:00:00 2001 From: Hugo Oliveira Date: Mon, 21 Oct 2019 12:24:47 +1100 Subject: [PATCH] add test for aquatrackaPP --- test/testOnlyCPHL.m | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/testOnlyCPHL.m b/test/testOnlyCPHL.m index 6bf88baa3..e26ebbe9c 100644 --- a/test/testOnlyCPHL.m +++ b/test/testOnlyCPHL.m @@ -111,6 +111,26 @@ function test_wqmdat(testCase, wqmdat_reader, wqmdat_v000_param, mode) assert(check_cphl(data)); end + function test_aquatrackapp(~,sbe19p_reader,sbe19p_v000_param,mode) + data = sbe19p_reader({sbe19p_v000_param},mode); + %fake volt_cphl variable + for k=1:length(data.variables) + if contains(data.variables{k}.name,'CPHL') + newvar = data.variables{k}; + newvar.name = 'volt_CHL'; + data.variables{end+1} = newvar; + break + end + end + output = aquatrackaPP({data},'qc',0); + data = output{1}; + comment = data.variables{end}.comment; + assert(check_cphl(data)); + assert(contains(comment,'analogic input')); + assert(contains(comment,'scaleFactor=')); + assert(contains(comment,'offset=')); + end + end end