Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
3a1eb9e5
Commit
3a1eb9e5
authored
Dec 07, 2014
by
Linquize
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update clar to e3985dd
parent
19ae8439
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/generate.py
+5
-5
No files found.
tests/generate.py
View file @
3a1eb9e5
...
@@ -80,7 +80,7 @@ class Module(object):
...
@@ -80,7 +80,7 @@ class Module(object):
return
re
.
sub
(
SKIP_COMMENTS_REGEX
,
_replacer
,
text
)
return
re
.
sub
(
SKIP_COMMENTS_REGEX
,
_replacer
,
text
)
def
parse
(
self
,
contents
):
def
parse
(
self
,
contents
):
TEST_FUNC_REGEX
=
r"^(void\s+(test_
%
s__(\w+))\(\s*void\s*\))\s*\{"
TEST_FUNC_REGEX
=
r"^(void\s+(test_
%
s__(\w+))\
s*\
(\s*void\s*\))\s*\{"
contents
=
self
.
_skip_comments
(
contents
)
contents
=
self
.
_skip_comments
(
contents
)
regex
=
re
.
compile
(
TEST_FUNC_REGEX
%
self
.
name
,
re
.
MULTILINE
)
regex
=
re
.
compile
(
TEST_FUNC_REGEX
%
self
.
name
,
re
.
MULTILINE
)
...
@@ -118,7 +118,7 @@ class Module(object):
...
@@ -118,7 +118,7 @@ class Module(object):
self
.
modified
=
True
self
.
modified
=
True
self
.
mtime
=
st
.
st_mtime
self
.
mtime
=
st
.
st_mtime
with
open
(
path
)
as
fp
:
with
codecs
.
open
(
path
,
encoding
=
'utf-8'
)
as
fp
:
raw_content
=
fp
.
read
()
raw_content
=
fp
.
read
()
except
IOError
:
except
IOError
:
...
@@ -150,7 +150,7 @@ class TestSuite(object):
...
@@ -150,7 +150,7 @@ class TestSuite(object):
for
test_file
in
tests_in_module
:
for
test_file
in
tests_in_module
:
full_path
=
os
.
path
.
join
(
root
,
test_file
)
full_path
=
os
.
path
.
join
(
root
,
test_file
)
module_name
=
"_"
.
join
(
module_root
+
[
test_file
[:
-
2
]])
module_name
=
"_"
.
join
(
module_root
+
[
test_file
[:
-
2
]])
.
replace
(
"-"
,
"_"
)
modules
.
append
((
full_path
,
module_name
))
modules
.
append
((
full_path
,
module_name
))
...
@@ -223,14 +223,14 @@ class TestSuite(object):
...
@@ -223,14 +223,14 @@ class TestSuite(object):
data
.
write
(
"static const size_t _clar_suite_count =
%
d;
\n
"
%
self
.
suite_count
())
data
.
write
(
"static const size_t _clar_suite_count =
%
d;
\n
"
%
self
.
suite_count
())
data
.
write
(
"static const size_t _clar_callback_count =
%
d;
\n
"
%
self
.
callback_count
())
data
.
write
(
"static const size_t _clar_callback_count =
%
d;
\n
"
%
self
.
callback_count
())
s
uite
.
save_cache
()
s
elf
.
save_cache
()
return
True
return
True
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
from
optparse
import
OptionParser
from
optparse
import
OptionParser
parser
=
OptionParser
()
parser
=
OptionParser
()
parser
.
add_option
(
'-f'
,
'--force'
,
dest
=
'force'
,
default
=
False
)
parser
.
add_option
(
'-f'
,
'--force'
,
action
=
"store_true"
,
dest
=
'force'
,
default
=
False
)
parser
.
add_option
(
'-x'
,
'--exclude'
,
dest
=
'excluded'
,
action
=
'append'
,
default
=
[])
parser
.
add_option
(
'-x'
,
'--exclude'
,
dest
=
'excluded'
,
action
=
'append'
,
default
=
[])
options
,
args
=
parser
.
parse_args
()
options
,
args
=
parser
.
parse_args
()
...
...
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