You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test.equal(root.lookup("Test3").comments.TWO,null,"should not parse lines for enum values");
21
21
test.equal(root.lookup("Test3").comments.THREE,"Preferred value with a comment.","should parse lines for enum values and prefer on top over trailing");
22
22
test.equal(root.lookup("Test3").comments.FOUR,"Other value with a comment.","should not confuse previous trailing comments with comments for the next field");
23
+
test.equal(root.lookup("Test3").comments.FIVE,"Leading comment for value with both types of comments after field with trailing comment.","should not confuse previous field with trailing comment when leading comment is present");
23
24
24
25
test.end();
25
26
});
26
27
});
27
28
28
29
tape.test("proto comments with trailing comment preferred",function(test){
test.equal(root.lookup("Test3").comments.TWO,null,"should not parse lines for enum values");
46
47
test.equal(root.lookup("Test3").comments.THREE,"Value with a comment.","should prefer trailing comment when preferTrailingComment option enabled");
47
48
test.equal(root.lookup("Test3").comments.FOUR,"Other value with a comment.","should not confuse previous trailing comments with comments for the next field");
49
+
test.equal(root.lookup("Test3").comments.FIVE,"Trailing comment for value with both types of comments after field with trailing comment.","should not confuse previous field with trailing comment when leading comment is present");
test.equal(root.lookup("Test3").comments.TWO,"Value with a single-line comment.","should parse double-slash comments for enum values");
32
32
test.equal(root.lookup("Test3").comments.THREE,"Value with a triple-slash comment.","should parse lines for enum values and prefer on top over trailing");
33
33
test.equal(root.lookup("Test3").comments.FOUR,"Other value with a comment.","should not confuse previous trailing comments with comments for the next field");
34
+
test.equal(root.lookup("Test3").comments.FIVE,"Leading comment for value with both types of comments after field with trailing comment.","should not confuse previous field with trailing comment when leading comment is present");
34
35
35
36
test.equal(root.lookup("ServiceTest.SingleLineMethod").comment,'My method does things');
@@ -70,6 +71,7 @@ tape.test("proto comments in alternate-parse mode with trailing comment preferre
70
71
test.equal(root.lookup("Test3").comments.TWO,"Value with a single-line comment.","should parse double-slash comments for enum values");
71
72
test.equal(root.lookup("Test3").comments.THREE,"ignored","should prefer trailing comment when preferTrailingComment option enabled");
72
73
test.equal(root.lookup("Test3").comments.FOUR,"Other value with a comment.","should not confuse previous trailing comments with comments for the next field");
74
+
test.equal(root.lookup("Test3").comments.FIVE,"Trailing comment for value with both types of comments after field with trailing comment.","should not confuse previous field with trailing comment when leading comment is present");
73
75
74
76
test.equal(root.lookup("ServiceTest.SingleLineMethod").comment,'My method does things');
0 commit comments