File tree Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,23 @@ find_package(Java REQUIRED)
3535
3636set (CODE_GENERATION_SCHEMA ${CODEC_SCHEMA_DIR} /code-generation-schema.xml)
3737set (GROUP_WITH_DATA_SCHEMA ${CODEC_SCHEMA_DIR} /group-with-data-schema.xml)
38+ set (ISSUE889_SCHEMA ${CODEC_SCHEMA_DIR} /issue889.xml)
3839
3940set (GENERATED_CODECS
4041 ${C_CODEC_TARGET_DIR}
4142)
4243
4344add_custom_command (
4445 OUTPUT ${GENERATED_CODECS}
45- DEPENDS sbe-jar ${SBE_JAR} ${CODE_GENERATION_SCHEMA} ${GROUP_WITH_DATA_SCHEMA}
46+ DEPENDS sbe-jar ${SBE_JAR} ${CODE_GENERATION_SCHEMA} ${GROUP_WITH_DATA_SCHEMA} ${ISSUE889_SCHEMA}
4647 COMMAND
4748 ${Java_JAVA_EXECUTABLE}
4849 -Dsbe.output .dir=${C_CODEC_TARGET_DIR}
4950 -Dsbe.target .language ="C"
5051 -jar ${SBE_JAR}
5152 ${CODE_GENERATION_SCHEMA}
5253 ${GROUP_WITH_DATA_SCHEMA}
54+ ${ISSUE889_SCHEMA}
5355)
5456
5557add_custom_target (c_codecs DEPENDS ${GENERATED_CODECS} )
@@ -58,6 +60,7 @@ add_custom_target(c_codecs DEPENDS ${GENERATED_CODECS})
5860sbe_test(BoundsCheckTest c_codecs)
5961sbe_test(CodeGenTest c_codecs)
6062sbe_test(GroupWithDataTest c_codecs)
63+ sbe_test(Issue889Test c_codecs)
6164
6265# Compile a dummy C source to test C compliance of generated headers.
6366add_executable (CComplianceTest CComplianceTest.c)
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2013-2022 Real Logic Limited.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ #include < gtest/gtest.h>
18+
19+ #include " issue889/lotType.h"
20+
21+ class Issue889Test : public testing ::Test
22+ {
23+ };
24+
25+ TEST_F (Issue889Test, shouldGenerateSpecalisedNullValue)
26+ {
27+ issue889_lotType lot_type;
28+
29+ EXPECT_TRUE (issue889_lotType_get (0 , &lot_type));
30+ EXPECT_EQ (lot_type, issue889_lotType::issue889_lotType_NULL_VALUE);
31+ }
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- #include " gtest/gtest.h"
17+ #include < gtest/gtest.h>
18+
1819#include " issue889/LotType.h"
1920
2021using namespace issue889 ;
You can’t perform that action at this time.
0 commit comments