Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
mantidproject
mantid
Commits
679b3a7d
Commit
679b3a7d
authored
12 years ago
by
Owen Arnold
Browse files
Options
Downloads
Patches
Plain Diff
refs #6105. Remove fragile test
parent
747f5148
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Framework/Geometry/test/IDFObjectTest.h
+0
-30
0 additions, 30 deletions
Code/Mantid/Framework/Geometry/test/IDFObjectTest.h
with
0 additions
and
30 deletions
Code/Mantid/Framework/Geometry/test/IDFObjectTest.h
+
0
−
30
View file @
679b3a7d
...
...
@@ -106,36 +106,6 @@ public:
TS_ASSERT_EQUALS
(
head
+
tail
,
obj
.
getMangledName
());
}
// Test that the last modified date fetched on each platform does actually make sense!
void
testGetModifiedTimestampAfterChange
()
{
const
std
::
string
fileName
=
"check_last_modified_date.xml"
;
const
std
::
string
fileContents
=
"some_idf_contents_that_donesn't_matter"
;
// Create a file.
ScopedFileHelper
::
ScopedFile
file
(
fileContents
,
fileName
);
IDFObject
IDFCreate
(
file
.
getFileName
());
// Record the modification timestamp
Poco
::
Timestamp
timeOfCreation
=
IDFCreate
.
getLastModified
();
// Delay
const
int
delay
=
10
;
Poco
::
Thread
::
sleep
(
delay
);
// Modify the file.
std
::
ofstream
modIDF
;
modIDF
.
open
(
IDFCreate
.
getFileFullPathStr
(),
std
::
ios
::
out
|
std
::
ios
::
app
);
if
(
!
modIDF
.
is_open
())
{
throw
std
::
runtime_error
(
"Cannot run test since file cannot be opened."
);
}
modIDF
<<
"
\n
change"
<<
std
::
endl
;
modIDF
.
close
();
// Record the modification timestamp.
IDFObject
IDFMod
(
file
.
getFileName
());
Poco
::
Timestamp
timeOfModification
=
IDFMod
.
getLastModified
();
// Compare the modification dates.
TSM_ASSERT_LESS_THAN
(
"The file modification dates do not reflect the fact that the file has been modified."
,
timeOfCreation
.
epochMicroseconds
(),
timeOfModification
.
epochMicroseconds
());
}
void
testGetFileFullPathStr
()
{
const
std
::
string
filename
=
ConfigService
::
Instance
().
getInstrumentDirectory
()
+
"/IDFs_for_UNIT_TESTING/IDF_for_UNIT_TESTING.xml"
;
...
...
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