summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/tests/test_pstring.cpp
diff options
context:
space:
mode:
author Couriersud <couriersud@gmx.org>2020-09-05 19:43:54 +0200
committer Couriersud <couriersud@gmx.org>2020-09-05 21:31:49 +0200
commitf3eb6324652fea263972087146fbdde9e32f9a0f (patch)
treef63d352948c3a4fcf62857839cc5c5359804b0f5 /src/lib/netlist/tests/test_pstring.cpp
parent4dd7e21f565b12e8487b884089d769f0b30147c6 (diff)
netlist: code maintenance and performance optimizations.
* rename some misleading type names * remove callback_t and replace by better scalable approach * hide implementations details * move sources classes from putil.h to psources.h * reduce code complexity * improve parsing performance, parsing netlists now is twice as fast. * fix issues around multi-byte string support * moved psplit into pstrutil.h
Diffstat (limited to 'src/lib/netlist/tests/test_pstring.cpp')
-rw-r--r--src/lib/netlist/tests/test_pstring.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/netlist/tests/test_pstring.cpp b/src/lib/netlist/tests/test_pstring.cpp
new file mode 100644
index 00000000000..097889f3407
--- /dev/null
+++ b/src/lib/netlist/tests/test_pstring.cpp
@@ -0,0 +1,19 @@
+// license:GPL-2.0+
+// copyright-holders:Couriersud
+
+///
+/// \file test_pstring.cpp
+///
+/// tests for pstring
+///
+
+#include "plib/ptests.h"
+
+#include "plib/pexception.h"
+#include "plib/pstring.h"
+
+PTEST(pstring, conversion)
+{
+ PEXPECT_EQ( putf8string("Общая ком"), putf8string(putf16string(putf8string("Общая ком"))));
+ PEXPECT_EQ( putf8string("Общая ком"), putf8string(putf16string("Общая ком")));
+}