Skip to content

Commit

Permalink
request expansion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danovaro committed Dec 23, 2024
1 parent d914ce6 commit e7bbd0c
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests/test_expand.cc
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ CASE( "test_metkit_expand_d1" ) {
{"realization", {"1"}},
{"resolution", {"high"}},
{"expver", {"0001"}},
{"date", {"20000101"}},
{"time", {"1200"}},
{"stream", {"clte"}},
{"type", {"fc"}},
Expand All @@ -681,10 +680,29 @@ CASE( "test_metkit_expand_d1" ) {
{"param", {"134","137"}}
};
expand(text, "retrieve", expected, {20000101});
}
{
const char* text = "retrieve,date=20120515,time=0000,dataset=climate-dt,activity=cmip6,experiment=hist,generation=1,model=icon,realization=1,resolution=high,class=d1,expver=0001,type=fc,stream=clte,levelist=1,levtype=o3d,param=263500";
std::map<std::string, std::vector<std::string>> expected{
{"class", {"d1"}},
{"dataset", {"climate-dt"}},
{"activity", {"cmip6"}},
{"experiment", {"hist"}},
{"model", {"icon"}},
{"generation", {"1"}},
{"realization", {"1"}},
{"resolution", {"high"}},
{"expver", {"0001"}},
{"time", {"0000"}},
{"stream", {"clte"}},
{"type", {"fc"}},
{"levtype", {"o3d"}},
{"levelist", {"1"}},
{"param", {"263500"}}
};
expand(text, "retrieve", expected, {20120515});
}
}


CASE( "test_metkit_expand_ng" ) {
{
const char* text = "retrieve,class=ng,date=20000101,activity=CMIP6,experiment=hist,model=IFS-NEMO,generation=1,realization=1,resolution=high,stream=clte,type=fc,levtype=pl,param=134/137";
Expand Down

0 comments on commit e7bbd0c

Please sign in to comment.