]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/yenc.qh
Merge remote-tracking branch 'origin/terencehill/bot_waypoints'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / yenc.qh
index 34cf0635d5876359eea555a4f7d90da31dbdf018..dce6e9c9d82459022ec231eeb5ee03b3f5e41c0e 100644 (file)
@@ -1,5 +1,4 @@
-#ifndef YENC_H
-#define YENC_H
+#pragma once
 
 #include "test.qh"
 
@@ -35,9 +34,7 @@
                if (conv <= 0) { \
                        ret = -1; \
                } else { \
-                       bool esc = false; \
                        if (conv == '=') { \
-                               esc = true; \
                                conv = STRING_ITERATOR_GET(stringiter); \
                                conv -= 64; \
                        } \
@@ -47,7 +44,7 @@
                } \
        } MACRO_END
 
-TEST(yEncDec)
+TEST(yEnc, EncodeDecode)
 {
        for (int i = 0; i <= 255; ++i)
        {
@@ -60,9 +57,7 @@ TEST(yEncDec)
                STRING_ITERATOR(fragmentiterator, fragment, 0);
                ydec_single(fragmentiterator, encdec);
 
-               TEST_Check(encdec == expect);
+               EXPECT_EQ(expect, encdec);
        }
-       TEST_OK();
+       SUCCEED();
 }
-
-#endif