-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added annotation attr and now we could query - FIND method_declaration WHERE annotation = "@deprecated" AND has_access = "true"
- Loading branch information
1 parent
8e00f0e
commit d5bae19
Showing
3 changed files
with
97 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package model | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestNewJavadocTag(t *testing.T) { | ||
tagName := "author" | ||
text := "John Doe" | ||
docType := "class" | ||
|
||
tag := NewJavadocTag(tagName, text, docType) | ||
|
||
if tag.TagName != tagName { | ||
t.Errorf("Expected TagName to be %s, got %s", tagName, tag.TagName) | ||
} | ||
|
||
if tag.Text != text { | ||
t.Errorf("Expected Text to be %s, got %s", text, tag.Text) | ||
} | ||
|
||
if tag.DocType != docType { | ||
t.Errorf("Expected DocType to be %s, got %s", docType, tag.DocType) | ||
} | ||
} | ||
|
||
func TestNewJavadocTagWithEmptyValues(t *testing.T) { | ||
tag := NewJavadocTag("", "", "") | ||
|
||
if tag.TagName != "" { | ||
t.Errorf("Expected TagName to be empty, got %s", tag.TagName) | ||
} | ||
|
||
if tag.Text != "" { | ||
t.Errorf("Expected Text to be empty, got %s", tag.Text) | ||
} | ||
|
||
if tag.DocType != "" { | ||
t.Errorf("Expected DocType to be empty, got %s", tag.DocType) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters