summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Peter <mail@david-peter.de>2021-07-13 09:07:29 +0200
committerDavid Peter <mail@david-peter.de>2021-07-13 09:07:29 +0200
commit64763eafbeac7a45208e3d22791057e7cbe2dac1 (patch)
tree646dcd6254fa7e641ba4121cc183612b4a48c022
parent3da46515692c3c3ebfd979c107e83393df85478b (diff)
Update Julia syntax test
-rw-r--r--tests/syntax-tests/highlighted/Julia/test.jl44
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/syntax-tests/highlighted/Julia/test.jl b/tests/syntax-tests/highlighted/Julia/test.jl
index 0750fd65..f287fd5a 100644
--- a/tests/syntax-tests/highlighted/Julia/test.jl
+++ b/tests/syntax-tests/highlighted/Julia/test.jl
@@ -1,10 +1,10 @@
-x = 3
+x = 3
-y = 2x
+y = 2x
typeof(y)
-f(x) = 2 + x
+f(x) = 2 + x
f
@@ -12,44 +12,44 @@
f(10)
-function g(x, y)
- z = x + y
- return z^2
+function g(x, y)
+ z = x + y
+ return z^2
end
g(1, 2)
-let s = 0
- for i in 1:10
- s += i # Equivalent to s = s + i
+let s = 0
+ for i in 1:10
+ s += i # Equivalent to s = s + i
 end
- s
+ s
end
typeof(1:10)
function mysum(n)
- s = 0
- for i in 1:n
- s += i
+ s = 0
+ for i in 1:n
+ s += i
 end
- return s
+ return s
end
mysum(100)
-a = 3
+a = 3
-a < 5
+a < 5
-if a < 5
+if a < 5
 "small"
else
 "big"
end
-v = [1, 2, 3]
+v = [1, 2, 3]
typeof(v)
@@ -57,15 +57,15 @@
v[2] = 10
-v2 = [i^2 for i in 1:10]
+v2 = [i^2 for i in 1:10]
-M = [1 2
+M = [1 2
 3 4]
typeof(M)
zeros(5, 5)
-zeros(Int, 4, 5)
+zeros(Int, 4, 5)
-[i + j for i in 1:5, j in 1:6]
+[i + j for i in 1:5, j in 1:6]