Skip to content

Commit 50474e1

Browse files
committed
Add test for context validate
1 parent 9418e3b commit 50474e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/rbs/inline_annotation_parsing_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,21 @@ def test_parse__skip
9797
end
9898

9999
def test_parse__return
100-
Parser.parse_inline_leading_annotation("@rbs return: untyped", 0...).tap do |annot|
100+
Parser.parse_inline_leading_annotation("@rbs return: void", 0...).tap do |annot|
101101
assert_instance_of AST::Ruby::Annotations::ReturnTypeAnnotation, annot
102-
assert_equal "@rbs return: untyped", annot.location.source
102+
assert_equal "@rbs return: void", annot.location.source
103103
assert_equal "return", annot.return_location.source
104104
assert_equal ":", annot.colon_location.source
105-
assert_equal "untyped", annot.return_type.location.source
105+
assert_equal "void", annot.return_type.location.source
106106
assert_nil annot.comment_location
107107
end
108108

109-
Parser.parse_inline_leading_annotation("@rbs return: untyped -- some comment here", 0...).tap do |annot|
109+
Parser.parse_inline_leading_annotation("@rbs return: self -- some comment here", 0...).tap do |annot|
110110
assert_instance_of AST::Ruby::Annotations::ReturnTypeAnnotation, annot
111-
assert_equal "@rbs return: untyped -- some comment here", annot.location.source
111+
assert_equal "@rbs return: self -- some comment here", annot.location.source
112112
assert_equal "return", annot.return_location.source
113113
assert_equal ":", annot.colon_location.source
114-
assert_equal "untyped", annot.return_type.location.source
114+
assert_equal "self", annot.return_type.location.source
115115
assert_equal "-- some comment here", annot.comment_location.source
116116
end
117117
end

0 commit comments

Comments
 (0)