summaryrefslogtreecommitdiff
path: root/vis/text-objects/functions.in
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-07 11:26:12 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-07 11:32:47 +0100
commitcc0f8e94fed7fa2542d746361acdbfe76401a93e (patch)
tree379109844bb8647534bcd6033f4fe55af404c6d1 /vis/text-objects/functions.in
parent6fce999e94d46c30e6c26ef31767279f813c90b5 (diff)
test: add a few new tests related to text objects
Diffstat (limited to 'vis/text-objects/functions.in')
-rw-r--r--vis/text-objects/functions.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/vis/text-objects/functions.in b/vis/text-objects/functions.in
new file mode 100644
index 0000000..5179cb2
--- /dev/null
+++ b/vis/text-objects/functions.in
@@ -0,0 +1,26 @@
+static double pi = 3.14;
+
+/* addition */
+int add(int a, int b) {
+ return a+b;
+}
+
+static double e = 2.71;
+
+/* multiplication of
+ *
+ * a*b
+ */
+int mul(int a, int b)
+{
+ return a*b;
+}
+
+static double sqrt2 = 1.41;
+
+int
+div(int a, int b)
+{
+ return a/b;
+}
+