Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
0ca4c92d
Commit
0ca4c92d
authored
13 years ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
Solved BZDNG-282 by adding a new case in ParseLoop(). (Just checking for lines starting with a '_')
parent
8a366788
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/io/src/mol/star_parser.cc
+3
-1
3 additions, 1 deletion
modules/io/src/mol/star_parser.cc
modules/io/tests/test_star_parser.cc
+2
-1
2 additions, 1 deletion
modules/io/tests/test_star_parser.cc
modules/io/tests/testfiles/data-item.cif
+7
-0
7 additions, 0 deletions
modules/io/tests/testfiles/data-item.cif
with
12 additions
and
2 deletions
modules/io/src/mol/star_parser.cc
+
3
−
1
View file @
0ca4c92d
...
...
@@ -171,6 +171,8 @@ void StarParser::ParseLoop()
if
(
StringRef
(
"loop_"
,
5
)
==
tline
)
{
return
;
}
case
'_'
:
return
;
default
:
if
(
process_rows
)
{
int
before
=
columns
.
size
();
...
...
@@ -270,7 +272,7 @@ void StarParser::ParseData()
if
(
tline
.
empty
())
{
this
->
ConsumeLine
();
continue
;
}
}
switch
(
tline
[
0
])
{
case
'_'
:
if
(
skip
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/io/tests/test_star_parser.cc
+
2
−
1
View file @
0ca4c92d
...
...
@@ -134,9 +134,10 @@ BOOST_AUTO_TEST_CASE(star_split3)
BOOST_REQUIRE
(
parts
.
size
()
==
1
);
BOOST_CHECK_EQUAL
(
parts
[
0
],
StringRef
(
"1 2"
,
3
));
}
BOOST_AUTO_TEST_CASE
(
star_data_item
)
{
BOOST_MESSAGE
(
" Running star_data_item tests..."
);
std
::
ifstream
s
(
"testfiles/data-item.cif"
);
DataItemTestParser
star_p
(
s
);
star_p
.
Parse
();
...
...
This diff is collapsed.
Click to expand it.
modules/io/tests/testfiles/data-item.cif
+
7
−
0
View file @
0ca4c92d
data_data-item
# this file covers BZDNG-282
loop_
_loop.s1
_loop.s2
_loop.s3
_loop.s4
1 2 3 4
_data-item.s1 a
_data-item.s2 'a b c'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment