Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Units: Add unit tests for null tags #4157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Units/null-tags.r/json-null-tag.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--sort=no
31 changes: 31 additions & 0 deletions Units/null-tags.r/json-null-tag.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<e> input.json /^ "<e>": "Empty",$/;" s object:legend
<n> input.json /^ "<n>": "Nonempty"$/;" s object:legend
legend input.json /^ "legend": {$/;" o
input.json /^ "": "Empty",$/;" s object:..
eeen input.json /^ "eeen": "Nonempty"$/;" s object:..
input.json /^ "": {$/;" o object:.
input.json /^ "": "Empty",$/;" s object:..een
eenn input.json /^ "eenn": "Nonempty"$/;" s object:..een
een input.json /^ "een": {$/;" o object:.
input.json /^ "": "Empty",$/;" s object:.en.
enen input.json /^ "enen": "Nonempty"$/;" s object:.en.
input.json /^ "": {$/;" o object:.en
input.json /^ "": "Empty",$/;" s object:.en.enn
ennn input.json /^ "ennn": "Nonempty"$/;" s object:.en.enn
enn input.json /^ "enn": {$/;" o object:.en
en input.json /^ "en": {$/;" o object:
input.json /^ "": {$/;" o
input.json /^ "": "Empty",$/;" s object:n..
neen input.json /^ "neen": "Nonempty"$/;" s object:n..
input.json /^ "": {$/;" o object:n.
input.json /^ "": "Empty",$/;" s object:n..nen
nenn input.json /^ "nenn": "Nonempty"$/;" s object:n..nen
nen input.json /^ "nen": {$/;" o object:n.
input.json /^ "": "Empty",$/;" s object:n.nn.
nnen input.json /^ "nnen": "Nonempty"$/;" s object:n.nn.
input.json /^ "": {$/;" o object:n.nn
input.json /^ "": "Empty",$/;" s object:n.nn.nnn
nnnn input.json /^ "nnnn": "Nonempty"$/;" s object:n.nn.nnn
nnn input.json /^ "nnn": {$/;" o object:n.nn
nn input.json /^ "nn": {$/;" o object:n
n input.json /^ "n": {$/;" o
50 changes: 50 additions & 0 deletions Units/null-tags.r/json-null-tag.d/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"legend": {
"<e>": "Empty",
"<n>": "Nonempty"
},
"": {
"": {
"": {
"": "Empty",
"eeen": "Nonempty"
},
"een": {
"": "Empty",
"eenn": "Nonempty"
}
},
"en": {
"": {
"": "Empty",
"enen": "Nonempty"
},
"enn": {
"": "Empty",
"ennn": "Nonempty"
}
}
},
"n": {
"": {
"": {
"": "Empty",
"neen": "Nonempty"
},
"nen": {
"": "Empty",
"nenn": "Nonempty"
}
},
"nn": {
"": {
"": "Empty",
"nnen": "Nonempty"
},
"nnn": {
"": "Empty",
"nnnn": "Nonempty"
}
}
}
}
1 change: 1 addition & 0 deletions Units/null-tags.r/tcl-null-tag.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--sort=no
11 changes: 11 additions & 0 deletions Units/null-tags.r/tcl-null-tag.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
input.tcl /^proc aaa {} {return Empty }$/;" p
aaa input.tcl /^proc aaa {} {return Normal}$/;" p
a input.tcl /^proc {a} {} {return Braced}$/;" p
ns1 input.tcl /^namespace eval ns1 {$/;" n
input.tcl /^ proc {} {} {return Empty }$/;" p namespace:::ns1
bbb input.tcl /^ proc bbb {} {return Normal}$/;" p namespace:::ns1
b input.tcl /^ proc {b} {} {return Braced}$/;" p namespace:::ns1
ns2 input.tcl /^namespace eval ns2$/;" n
input.tcl /^proc ns2:: {} {return Empty }$/;" p namespace:ns2
ccc input.tcl /^proc ns2::ccc {} {return Normal}$/;" p namespace:ns2
c input.tcl /^proc {ns2::c} {} {return Braced}$/;" p namespace:ns2
14 changes: 14 additions & 0 deletions Units/null-tags.r/tcl-null-tag.d/input.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
proc {} {} {return Empty }
proc aaa {} {return Normal}
proc {a} {} {return Braced}

namespace eval ns1 {
proc {} {} {return Empty }
proc bbb {} {return Normal}
proc {b} {} {return Braced}
}

namespace eval ns2
proc ns2:: {} {return Empty }
proc ns2::ccc {} {return Normal}
proc {ns2::c} {} {return Braced}
1 change: 1 addition & 0 deletions Units/null-tags.r/verilog-null-tag.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--sort=no
14 changes: 14 additions & 0 deletions Units/null-tags.r/verilog-null-tag.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
input.sv /^module \\ ;$/;" m
input.sv /^ } \\ ;$/;" S module:
input.sv /^ } \\ ;$/;" w struct:.
een input.sv /^ } \\een ;$/;" w struct:.
en input.sv /^ } \\en ;$/;" S module:
input.sv /^ } \\ ;$/;" w struct:.en
enn input.sv /^ } \\enn ;$/;" w struct:.en
n input.sv /^module \\n ;$/;" m
input.sv /^ } \\ ;$/;" S module:n
input.sv /^ } \\ ;$/;" w struct:n.
nen input.sv /^ } \\nen ;$/;" w struct:n.
nn input.sv /^ } \\nn ;$/;" S module:n
input.sv /^ } \\ ;$/;" w struct:n.nn
nnn input.sv /^ } \\nnn ;$/;" w struct:n.nn
51 changes: 51 additions & 0 deletions Units/null-tags.r/verilog-null-tag.d/input.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* Legend:
* <e> = empty (null)
* <n> = non-empty
*/

module \ ;
struct {
struct {
logic \ ;
logic \eeen ;
} \ ;
struct {
logic \ ;
logic \eenn ;
} \een ;
} \ ;
struct {
struct {
logic \ ;
logic \enen ;
} \ ;
struct {
logic \ ;
logic \ennn ;
} \enn ;
} \en ;
endmodule

module \n ;
struct {
struct {
logic \ ;
logic \neen ;
} \ ;
struct {
logic \ ;
logic \nenn ;
} \nen ;
} \ ;
struct {
struct {
logic \ ;
logic \nnen ;
} \ ;
struct {
logic \ ;
logic \nnnn ;
} \nnn ;
} \nn ;
endmodule

Loading