Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
55aab59e
Commit
55aab59e
authored
Jul 26, 2011
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
class & funcs ignore list support is added
parent
a69c2901
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
check-tests.py
modules/java/check-tests.py
+21
-0
No files found.
modules/java/check-tests.py
View file @
55aab59e
import
sys
,
os
,
re
import
sys
,
os
,
re
classes_ignore_list
=
(
'OpenCV(Test)?Case'
,
'OpenCV(Test)?Runner'
,
'CvException'
,
)
funcs_ignore_list
=
(
'
\
w+--HashCode'
,
'Mat--MatLong'
,
)
class
JavaParser
:
class
JavaParser
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
clear
()
self
.
clear
()
...
@@ -52,6 +63,9 @@ class JavaParser:
...
@@ -52,6 +63,9 @@ class JavaParser:
def
parse_file
(
self
,
fname
):
def
parse_file
(
self
,
fname
):
clsname
=
os
.
path
.
basename
(
fname
)
.
replace
(
"Test"
,
""
)
.
replace
(
".java"
,
""
)
clsname
=
os
.
path
.
basename
(
fname
)
.
replace
(
"Test"
,
""
)
.
replace
(
".java"
,
""
)
clsname
=
clsname
[
0
]
.
upper
()
+
clsname
[
1
:]
clsname
=
clsname
[
0
]
.
upper
()
+
clsname
[
1
:]
for
cls
in
classes_ignore_list
:
if
re
.
match
(
cls
,
clsname
):
return
f
=
open
(
fname
,
"rt"
)
f
=
open
(
fname
,
"rt"
)
for
line
in
f
:
for
line
in
f
:
m1
=
self
.
r1
.
match
(
line
)
m1
=
self
.
r1
.
match
(
line
)
...
@@ -77,6 +91,13 @@ class JavaParser:
...
@@ -77,6 +91,13 @@ class JavaParser:
args_str
=
re
.
sub
(
r"List<(\w+)>"
,
"ListOf
\
g<1>"
,
args_str
)
args_str
=
re
.
sub
(
r"List<(\w+)>"
,
"ListOf
\
g<1>"
,
args_str
)
args
=
[
a
.
split
()[
0
]
for
a
in
args_str
.
split
(
","
)
if
a
]
args
=
[
a
.
split
()[
0
]
for
a
in
args_str
.
split
(
","
)
if
a
]
func_ex
=
func
+
""
.
join
([
a
[
0
]
.
upper
()
+
a
[
1
:]
for
a
in
args
])
func_ex
=
func
+
""
.
join
([
a
[
0
]
.
upper
()
+
a
[
1
:]
for
a
in
args
])
skip
=
False
for
fi
in
funcs_ignore_list
:
if
re
.
match
(
fi
,
func_ex
):
skip
=
True
break
if
skip
:
continue
if
func
in
d
:
if
func
in
d
:
d
[
func
]
.
append
(
func_ex
)
d
[
func
]
.
append
(
func_ex
)
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment