@@ -62,6 +62,21 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
6262 // read back the option from the command line, see CMakeLists.txt
6363 auto configstring = ic.options ().get <std::string>(" global-config" );
6464 auto anotheroption = ic.options ().get <std::string>(" local-option" );
65+ auto aBoolean = ic.options ().get <bool >(" a-boolean" );
66+ auto aBoolean2 = ic.options ().get <bool >(" a-boolean2" );
67+ auto aBoolean3 = ic.options ().get <bool >(" a-boolean3" );
68+ auto anInt = ic.options ().get <int >(" an-int" );
69+ auto anInt2 = ic.options ().get <int >(" an-int2" );
70+ auto aDouble = ic.options ().get <double >(" a-double" );
71+ auto aDouble2 = ic.options ().get <double >(" a-double2" );
72+
73+ ASSERT_ERROR (aBoolean == true );
74+ ASSERT_ERROR (aBoolean2 == false );
75+ ASSERT_ERROR (aBoolean3 == true );
76+ ASSERT_ERROR (anInt == 10 );
77+ ASSERT_ERROR (anInt2 == 20 );
78+ ASSERT_ERROR (aDouble == 11 .);
79+ ASSERT_ERROR (aDouble2 == 22 .);
6580 ASSERT_ERROR (configstring == " consumer-config" );
6681 ASSERT_ERROR (anotheroption == " hello-aliceo2" );
6782
@@ -74,6 +89,13 @@ WorkflowSpec defineDataProcessing(ConfigContext const&)
7489 {
7590 ConfigParamSpec{ " global-config" , VariantType::String, { " A global config option for all processor specs" } },
7691 ConfigParamSpec{ " local-option" , VariantType::String, { " Option only valid for this processor spec" } },
92+ ConfigParamSpec{ " a-boolean" , VariantType::Bool, true , { " A boolean which we pick by default" } },
93+ ConfigParamSpec{ " a-boolean2" , VariantType::Bool, false , { " Another boolean which we pick by default" } },
94+ ConfigParamSpec{ " a-boolean3" , VariantType::Bool, false , { " Another boolean which we pick from the outside options" } },
95+ ConfigParamSpec{ " an-int" , VariantType::Int, 10 , { " An int for which we pick up the default" } },
96+ ConfigParamSpec{ " an-int2" , VariantType::Int, 1 , { " An int for which we pick up the override" } },
97+ ConfigParamSpec{ " a-double" , VariantType::Double, 11 ., { " A double for which we pick up the override" } },
98+ ConfigParamSpec{ " a-double2" , VariantType::Double, 12 ., { " A double for which we pick up the override" } },
7799 },
78100 }
79101 };
0 commit comments