-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support interfaces in Java and PHP (#183)
Closes #182
- Loading branch information
1 parent
f027ac4
commit 88698b1
Showing
6 changed files
with
65 additions
and
16 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
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
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,35 @@ | ||
--- Test cases for emmylua | ||
--- | ||
--- @module 'tests.neogen.lua_spec' | ||
|
||
local specs = require('tests.utils.specs') | ||
|
||
local function make_emmylua(source, type) | ||
return specs.make_docstring(source, 'java', { type = type, annotation_convention = { java = 'javadoc' } }) | ||
end | ||
|
||
describe("java: javadoc", function() | ||
describe("class", function() | ||
it("works with an basic interface", function() | ||
local source = [[ | ||
public interface Entity { | ||
@NonNull UUID getId();|cursor| | ||
} | ||
]] | ||
|
||
local expected = [[ | ||
/** | ||
* [TODO:description] | ||
* | ||
*/ | ||
public interface Entity { | ||
@NonNull UUID getId(); | ||
} | ||
]] | ||
|
||
local result = make_emmylua(source, "class") | ||
|
||
assert.equal(expected, result) | ||
end) | ||
end) | ||
end) |