Skip to content

Commit 31478f5

Browse files
Tweak MIPS (#84)
1 parent 253fc23 commit 31478f5

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

lib/languages/mips.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
!e
22
#\p
3+
.data
4+
.text
5+
.globl

test/languages/mips_test.rb

+11-9
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,31 @@ def test_full_example
66
# General comment
77
#
88
# $a0 - input
9-
9+
1010
.globl binary_convert
11-
11+
12+
.data
13+
14+
.text
15+
1216
binary_convert:
1317
li $v0, 0 # line comment
14-
18+
1519
# Another line comment
1620
end:
1721
jr $ra
18-
22+
1923
CODE
2024

21-
expected = <<~CODE
22-
.globl binary_convert
23-
25+
expected = <<~CODE
2426
binary_convert:
2527
li $v0, 0
2628
2729
end:
2830
jr $ra
29-
31+
3032
CODE
3133

32-
assert_equal expected, SnippetExtractor::ExtractSnippet.(code, :nim)
34+
assert_equal expected, SnippetExtractor::ExtractSnippet.(code, :mips)
3335
end
3436
end

0 commit comments

Comments
 (0)