[vala/0.48] tests: Add "string concat" test for POSIX to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] tests: Add "string concat" test for POSIX to increase coverage
- Date: Sun, 14 Mar 2021 15:47:45 +0000 (UTC)
commit d77c840a62251c54d8646898ac8a867d595f311a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Mar 9 15:52:30 2021 +0100
tests: Add "string concat" test for POSIX to increase coverage
tests/Makefile.am | 1 +
tests/posix/string-concat.vala | 8 ++++++++
2 files changed, 9 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 32a265166..34615cd34 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1156,6 +1156,7 @@ LINUX_TESTS += \
linux/file-commandpipe.vala \
posix/arrays.vala \
posix/empty-length-0.vala \
+ posix/string-concat.vala \
posix/struct_only.vala \
posix/delegate_only.vala \
posix/enum_only.vala \
diff --git a/tests/posix/string-concat.vala b/tests/posix/string-concat.vala
new file mode 100644
index 000000000..ead6abeed
--- /dev/null
+++ b/tests/posix/string-concat.vala
@@ -0,0 +1,8 @@
+unowned string get_foo () {
+ return "foo";
+}
+
+void main () {
+ string s = get_foo () + "bar" + "!";
+ assert (s == "foobar!");
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]