necouchman commented on a change in pull request #228:
URL: https://github.com/apache/guacamole-server/pull/228#discussion_r489835523



##########
File path: src/libguac/tests/protocol/guac_protocol_version.c
##########
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <CUnit/CUnit.h>
+#include <guacamole/protocol.h>
+#include <guacamole/protocol-types.h>
+
+/**
+ * Test which verifies that conversion of the guac_protocol_version enum to
+ * string values succeeds and produces the expected results.
+ */
+void test_guac_protocol__version_to_string() {
+    
+    guac_protocol_version version_a = GUAC_PROTOCOL_VERSION_1_3_0;
+    guac_protocol_version version_b = GUAC_PROTOCOL_VERSION_1_0_0;
+    guac_protocol_version version_c = GUAC_PROTOCOL_VERSION_UNKNOWN;
+    
+    CU_ASSERT_STRING_EQUAL_FATAL(guac_protocol_version_to_string(version_a), 
"VERSION_1_3_0");

Review comment:
       I'm just not all that familiar with the CUnit framework, so I went for 
broke.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to