Fix AutomationListPropertyTest
These tests use reference files that were generated with a particular value for superclock_ticks_per_second. The default for that has changed since the last time the reference files were updated though, causing tests to fail. Rather than updating the reference files for the new default value, this makes the test not depend on the default value by hardcoding the value that was used to generate the reference files.
This commit is contained in:
parent
b4169a0391
commit
185fe497c6
@ -46,11 +46,17 @@ write_automation_list_xml (XMLNode* node, std::string filename)
|
||||
void
|
||||
AutomationListPropertyTest::setUp ()
|
||||
{
|
||||
// The reference files were created with this superclock ticks per second
|
||||
// value. Setting this here makes sure we don't need to update all the
|
||||
// reference files whenever the default value changes.
|
||||
_saved_superclock_ticks_per_second = Temporal::superclock_ticks_per_second();
|
||||
Temporal::set_superclock_ticks_per_second(56448000);
|
||||
}
|
||||
|
||||
void
|
||||
AutomationListPropertyTest::tearDown ()
|
||||
{
|
||||
Temporal::set_superclock_ticks_per_second(_saved_superclock_ticks_per_second);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
#include "temporal/superclock.h"
|
||||
|
||||
class AutomationListPropertyTest : public CppUnit::TestFixture
|
||||
{
|
||||
CPPUNIT_TEST_SUITE (AutomationListPropertyTest);
|
||||
@ -31,4 +33,7 @@ public:
|
||||
void tearDown ();
|
||||
void basicTest ();
|
||||
void undoTest ();
|
||||
|
||||
private:
|
||||
Temporal::superclock_t _saved_superclock_ticks_per_second;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user