Commit f599b769 authored by Nicolas Carion's avatar Nicolas Carion
Browse files

Update Catch+FakeIt, simplify logic for timewarping and start testing timewarp...

Update Catch+FakeIt, simplify logic for timewarping and start testing timewarp (not working due to MLT weirdness)
parent a97fa5d8
......@@ -149,6 +149,7 @@ if (BUILD_TESTS)
src
)
ADD_EXECUTABLE(runTests ${Tests_SRCS})
set_property(TARGET runTests PROPERTY CXX_STANDARD 14)
target_link_libraries(runTests kdenliveLib)
ADD_TEST(runTests runTests -d yes)
else()
......
......@@ -430,6 +430,7 @@ void ProjectClip::createDisabledMasterProducer()
}
std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int clipId, PlaylistState::ClipState state, double speed)
{
qDebug() << "producer request"<<clipId<<speed;
if (qFuzzyCompare(speed, 1.0)) {
// we are requesting a normal speed producer
// We can first cleen the speed producers we have for the current id
......@@ -476,6 +477,7 @@ std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int clipId, Play
if (qFuzzyCompare(m_timewarpProducers[clipId]->get_double("warp_speed"), speed)) {
// the producer we have is good, use it !
warpProducer = m_timewarpProducers[clipId];
qDebug() << "Reusing producer!";
} else {
m_timewarpProducers.erase(clipId);
}
......@@ -484,8 +486,10 @@ std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int clipId, Play
QLocale locale;
QString resource = QString("timewarp:%1:%2").arg(locale.toString(speed)).arg(originalProducer()->get("resource"));
warpProducer.reset(new Mlt::Producer(*originalProducer()->profile(), resource.toUtf8().constData()));
qDebug() << "new producer!";
}
qDebug() << "warp LENGTH" << warpProducer->get_length();
warpProducer->set("set.test_audio", 1);
warpProducer->set("set.test_image", 1);
if (state == PlaylistState::AudioOnly) {
......
......@@ -126,8 +126,8 @@ ClipModel::~ClipModel() {}
bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool logUndo)
{
QWriteLocker locker(&m_lock);
// qDebug() << "RESIZE CLIP" << m_id << "target size=" << size << "right=" << right << "endless=" << m_endlessResize << "total length" <<
// m_producer->get_length() << "current length" << getPlaytime();
qDebug() << "RESIZE CLIP" << m_id << "target size=" << size << "right=" << right << "endless=" << m_endlessResize << "total length"
<< m_producer->get_length() << "current length" << getPlaytime();
if (!m_endlessResize && (size <= 0 || size > m_producer->get_length())) {
return false;
}
......@@ -142,13 +142,14 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
bool ClipModel::requestResize(int old_in, int old_out, int oldDuration, int delta, bool right, Fun &undo, Fun &redo, bool logUndo)
{
QWriteLocker locker(&m_lock);
// qDebug() << "RESIZE CLIP" << m_id << "target size=" << size << "right=" << right << "endless=" << m_endlessResize << "total length" <<
// m_producer->get_length() << "current length" << getPlaytime();
qDebug() << "requestResize" << old_in << old_out << oldDuration << delta << right << m_producer->get_length();
// check if there is enough space on the chosen side
if (!right && old_in + delta < 0 && !m_endlessResize) {
qDebug() << "fail 1";
return false;
}
if (!m_endlessResize && right && old_out - delta >= m_producer->get_length()) {
qDebug() << "fail 2";
return false;
}
int in = old_in;
......@@ -339,11 +340,18 @@ bool ClipModel::isAudioOnly() const
return m_currentState == PlaylistState::AudioOnly;
}
void ClipModel::refreshProducerFromBin(PlaylistState::ClipState state)
void ClipModel::refreshProducerFromBin(PlaylistState::ClipState state, double speed)
{
QWriteLocker locker(&m_lock);
int in = getIn();
int out = getOut();
qDebug() << "refresh " << speed << m_speed << in << out;
if (!qFuzzyCompare(speed, m_speed) && speed != 0.) {
in = in * m_speed / speed;
out = in + getPlaytime() - 1;
m_speed = speed;
qDebug() << "changing speed" << in << out << m_speed;
}
std::shared_ptr<ProjectClip> binClip = pCore->projectItemModel()->getClipByBinID(m_binClipId);
std::shared_ptr<Mlt::Producer> binProducer = binClip->getTimelineProducer(m_id, state, m_speed);
m_producer = std::move(binProducer);
......@@ -362,79 +370,43 @@ void ClipModel::refreshProducerFromBin()
bool ClipModel::useTimewarpProducer(double speed, int extraSpace, Fun &undo, Fun &redo)
{
if (m_endlessResize || qFuzzyCompare(speed, m_speed)) {
if (m_endlessResize) {
// no timewarp for endless producers
return false;
}
if (qFuzzyCompare(speed, m_speed)) {
// nothing to do
return true;
}
std::function<bool(void)> local_undo = []() { return true; };
std::function<bool(void)> local_redo = []() { return true; };
double previousSpeed = getSpeed();
int old_in = getIn();
int old_out = getOut();
int oldDuration = old_out - old_in;
int newIn = old_in * previousSpeed / speed;
auto operation = useTimewarpProducer_lambda(speed);
Fun newInOperation = [this, newIn]() {
int duration = m_producer->get_playtime() - 1;
m_producer->set_in_and_out(newIn, newIn + duration);
return true;
};
Fun oldInOperation = [this, old_in]() {
int duration = m_producer->get_playtime() - 1;
m_producer->set_in_and_out(old_in, old_in + duration);
return true;
};
int oldDuration = getPlaytime();
int newDuration = int(double(oldDuration) * previousSpeed / speed);
if (extraSpace > 0 && (newDuration >= extraSpace)) {
newDuration = extraSpace;
}
auto operation = useTimewarpProducer_lambda(speed);
auto reverse = useTimewarpProducer_lambda(previousSpeed);
bool res = false;
// We have 2 different cases here to have a working undo. If the speed is slowed (<1), duration will be increased
// So the new out point might be outside current clip. So we perform the producer change, then resize
if (speed < previousSpeed) {
// Update to timewarp producer, duration is longer.
res = operation();
if (res) {
UPDATE_UNDO_REDO(operation, reverse, local_undo, local_redo);
// Adjust length
res = requestResize(old_in, old_out, oldDuration, oldDuration - newDuration, true, local_undo, local_redo, true);
if (res) {
// Set the new in point
newInOperation();
UPDATE_UNDO_REDO(newInOperation, oldInOperation, local_undo, local_redo);
}
}
} else {
// Speed is increased (>1), duration will be shortened
// So we first resize to the new duration, then change the producer
// Resize to shortened length
// Switch to timewarp producer
res = requestResize(old_in, old_out, oldDuration, oldDuration - newDuration, true, local_undo, local_redo, true);
if (res) {
UPDATE_UNDO_REDO(newInOperation, oldInOperation, local_undo, local_redo);
UPDATE_UNDO_REDO(operation, reverse, local_undo, local_redo);
// Update in point
newInOperation();
res = operation();
if (operation()) {
UPDATE_UNDO_REDO(operation, reverse, local_undo, local_redo);
bool res = requestResize(newDuration, true, local_undo, local_redo, true);
if (!res) {
local_undo();
return false;
}
UPDATE_UNDO_REDO(local_redo, local_undo, undo, redo);
return true;
}
if (!res) {
return false;
}
UPDATE_UNDO_REDO(local_redo, local_undo, undo, redo);
return true;
return false;
}
Fun ClipModel::useTimewarpProducer_lambda(double speed)
{
QWriteLocker locker(&m_lock);
return [speed, this]() {
m_speed = speed;
refreshProducerFromBin(m_currentState);
qDebug() << "timeWarp producer" << speed;
refreshProducerFromBin(m_currentState, speed);
if (auto ptr = m_parent.lock()) {
QModelIndex ix = ptr->makeClipIndexFromID(m_id);
ptr->notifyChange(ix, ix, {TimelineModel::SpeedRole});
ptr->notifyChange(ix, ix, TimelineModel::SpeedRole);
}
return true;
};
......
......@@ -153,8 +153,11 @@ protected:
*/
void setTimelineEffectsEnabled(bool enabled);
/* @brief This functions should be called when the producer of the binClip changes, to allow refresh */
void refreshProducerFromBin(PlaylistState::ClipState state);
/* @brief This functions should be called when the producer of the binClip changes, to allow refresh
* @param state corresponds to the state of the clip we want (audio or video)
* @param speed corresponds to the speed we need. Leave to 0 to keep current speed. Warning: this function doesn't notify the model. Unless you know what you are doing, better use uteTimewarProducer to change the speed
*/
void refreshProducerFromBin(PlaylistState::ClipState state, double speed = 0);
void refreshProducerFromBin();
/* @brief This functions replaces the current producer with a slowmotion one
......
......@@ -488,6 +488,11 @@ void TimelineItemModel::notifyChange(const QModelIndex &topleft, const QModelInd
emit dataChanged(topleft, bottomright, roles);
}
void TimelineItemModel::notifyChange(const QModelIndex &topleft, const QModelIndex &bottomright, int role)
{
emit dataChanged(topleft, bottomright, {role});
}
void TimelineItemModel::_beginRemoveRows(const QModelIndex &i, int j, int k)
{
// qDebug()<<"FORWARDING beginRemoveRows"<<i<<j<<k;
......
......@@ -87,6 +87,7 @@ public:
const QString getTrackFullName(int tid) const;
void notifyChange(const QModelIndex &topleft, const QModelIndex &bottomright, bool start, bool duration, bool updateThumb) override;
void notifyChange(const QModelIndex &topleft, const QModelIndex &bottomright, const QVector<int> &roles) override;
void notifyChange(const QModelIndex &topleft, const QModelIndex &bottomright, int role) override;
void buildTrackCompositing();
const QString groupsData();
bool loadGroups(const QString &groupsData);
......
......@@ -2194,7 +2194,7 @@ void TimelineModel::requestClipUpdate(int clipId, const QVector<int> &roles)
notifyChange(modelIndex, modelIndex, roles);
}
bool TimelineModel::requestClipTimeWarp(int clipId, int trackId, int blankSpace, double speed, Fun &undo, Fun &redo)
bool TimelineModel::requestClipTimeWarp(int clipId, int blankSpace, double speed, Fun &undo, Fun &redo)
{
QWriteLocker locker(&m_lock);
if (qFuzzyCompare(speed, m_allClips[clipId]->getSpeed())) {
......@@ -2205,12 +2205,15 @@ bool TimelineModel::requestClipTimeWarp(int clipId, int trackId, int blankSpace,
int oldPos = getClipPosition(clipId);
// in order to make the producer change effective, we need to unplant / replant the clip in int track
bool success = true;
success = getTrackById(trackId)->requestClipDeletion(clipId, true, true, local_undo, local_redo);
int trackId = getClipTrackId(clipId);
if (trackId != -1) {
success = success && getTrackById(trackId)->requestClipDeletion(clipId, true, true, local_undo, local_redo);
}
if (success) {
success = m_allClips[clipId]->useTimewarpProducer(speed, blankSpace, local_undo, local_redo);
}
if (success) {
success = getTrackById(trackId)->requestClipInsertion(clipId, oldPos, true, true, local_undo, local_redo);
if (trackId != -1) {
success = success && getTrackById(trackId)->requestClipInsertion(clipId, oldPos, true, true, local_undo, local_redo);
}
if (!success) {
local_undo();
......@@ -2241,10 +2244,10 @@ bool TimelineModel::changeItemSpeed(int clipId, double speed)
blankSpace = qMin(blankSpace, partnerSpace);
}
}
result = requestClipTimeWarp(splitId, split_trackId, blankSpace, speed / 100.0, undo, redo);
result = requestClipTimeWarp(splitId, blankSpace, speed / 100.0, undo, redo);
}
if (result) {
result = requestClipTimeWarp(clipId, trackId, blankSpace, speed / 100.0, undo, redo);
result = requestClipTimeWarp(clipId, blankSpace, speed / 100.0, undo, redo);
} else {
pCore->displayMessage(i18n("Change speed failed"), ErrorMessage);
undo();
......
......@@ -527,7 +527,7 @@ public:
std::shared_ptr<EffectStackModel> getTrackEffectStackModel(int trackId);
/** @brief Add slowmotion effect to clip in timeline. */
bool requestClipTimeWarp(int clipId, int trackId, int blankSpace, double speed, Fun &undo, Fun &redo);
bool requestClipTimeWarp(int clipId, int blankSpace, double speed, Fun &undo, Fun &redo);
bool changeItemSpeed(int clipId, double speed);
void replugClip(int clipId);
/** @brief Refresh the tractor profile in case a change was requested. */
......@@ -678,6 +678,7 @@ protected:
virtual void _endInsertRows() = 0;
virtual void notifyChange(const QModelIndex &topleft, const QModelIndex &bottomright, bool start, bool duration, bool updateThumb) = 0;
virtual void notifyChange(const QModelIndex &topleft, const QModelIndex &bottomright, const QVector<int> &roles) = 0;
virtual void notifyChange(const QModelIndex &topleft, const QModelIndex &bottomright, int role) = 0;
virtual QModelIndex makeClipIndexFromID(int) const = 0;
virtual QModelIndex makeCompositionIndexFromID(int) const = 0;
virtual QModelIndex makeTrackIndexFromID(int) const = 0;
......
############################
# Tests
############################
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fexceptions")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -fexceptions")
string (REPLACE "-std=gnu++11" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(Tests_SRCS
......@@ -15,6 +16,7 @@ SET(Tests_SRCS
tests/regressions.cpp
tests/snaptest.cpp
tests/test_utils.cpp
tests/timewarptest.cpp
tests/treetest.cpp
PARENT_SCOPE
)
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2017-04-09 00:27:34.306415
* Generated: 2017-11-05 20:30:40.182814
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
......@@ -375,10 +375,16 @@ namespace fakeit {
namespace fakeit {
struct ActualInvocationsContainer {
virtual void clear() = 0;
virtual ~ActualInvocationsContainer() NO_THROWS { }
};
struct ActualInvocationsSource {
virtual void getActualInvocations(std::unordered_set<fakeit::Invocation *> &into) const = 0;
virtual ~ActualInvocationsSource() NO_THROWS { };
virtual ~ActualInvocationsSource() NO_THROWS { }
};
struct InvocationsSourceProxy : public ActualInvocationsSource {
......@@ -746,6 +752,9 @@ namespace fakeit {
void handle(const UnexpectedMethodCallEvent &e) override {
fireEvent(e);
auto &eh = getTestingFrameworkAdapter();
#ifdef FAKEIT_ASSERT_ON_UNEXPECTED_METHOD_INVOCATION
assert(!"Unexpected method invocation");
#endif
eh.handle(e);
}
......@@ -864,6 +873,17 @@ namespace fakeit {
return out.str();
}
static std::string formatExpectedPattern(const std::vector<fakeit::Sequence *> &expectedPattern) {
std::string expectedPatternStr;
for (unsigned int i = 0; i < expectedPattern.size(); i++) {
Sequence *s = expectedPattern[i];
expectedPatternStr += formatSequence(*s);
if (i < expectedPattern.size() - 1)
expectedPatternStr += " ... ";
}
return expectedPatternStr;
}
private:
static std::string formatSequence(const Sequence &val) {
......@@ -929,17 +949,6 @@ namespace fakeit {
out << " * " << val.getTimes();
return out.str();
}
static std::string formatExpectedPattern(const std::vector<fakeit::Sequence *> &expectedPattern) {
std::string expectedPatternStr;
for (unsigned int i = 0; i < expectedPattern.size(); i++) {
Sequence *s = expectedPattern[i];
expectedPatternStr += formatSequence(*s);
if (i < expectedPattern.size() - 1)
expectedPatternStr += " ... ";
}
return expectedPatternStr;
}
};
}
namespace fakeit {
......@@ -1064,6 +1073,20 @@ namespace fakeit {
};
}
#include <string>
#include <sstream>
#include <iomanip>
namespace fakeit {
template<typename T>
static std::string to_string(const T &n) {
std::ostringstream stm;
stm << n;
return stm.str();
}
}
namespace fakeit {
......@@ -1127,9 +1150,9 @@ namespace fakeit {
std::string formatLineNumber(std::string file, int num) {
#ifndef __GNUG__
return file + std::string("(") + std::to_string(num) + std::string(")");
return file + std::string("(") + fakeit::to_string(num) + std::string(")");
#else
return file + std::string(":") + std::to_string(num);
return file + std::string(":") + fakeit::to_string(num);
#endif
}
......@@ -1140,36 +1163,36 @@ namespace fakeit {
CatchAdapter(EventFormatter &formatter)
: _formatter(formatter) {}
void fail(
std::string vetificationType,
Catch::SourceLineInfo sourceLineInfo,
std::string failingExpression,
std::string fomattedMessage,
Catch::ResultWas::OfType resultWas = Catch::ResultWas::OfType::ExpressionFailed ){
Catch::AssertionHandler catchAssertionHandler( vetificationType, sourceLineInfo, failingExpression, Catch::ResultDisposition::Normal );
INTERNAL_CATCH_TRY( catchAssertionHandler ) { \
CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \
catchAssertionHandler.handle( resultWas , fomattedMessage); \
CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
INTERNAL_CATCH_REACT( catchAssertionHandler )
}
virtual void handle(const UnexpectedMethodCallEvent &evt) override {
std::string format = _formatter.format(evt);
Catch::ResultBuilder __catchResult("FAIL", ::Catch::SourceLineInfo(),
"", Catch::ResultDisposition::Normal);
__catchResult << format + ::Catch::StreamEndStop();
__catchResult.captureResult(Catch::ResultWas::ExplicitFailure);
INTERNAL_CATCH_REACT(__catchResult)
throw Catch::TestFailureException();
fail("UnexpectedMethodCall",::Catch::SourceLineInfo("Unknown file",0),"",format, Catch::ResultWas::OfType::ExplicitFailure);
}
virtual void handle(const SequenceVerificationEvent &evt) override {
std::string format(formatLineNumber(evt.file(), evt.line()) + ": " + _formatter.format(evt));
Catch::ResultBuilder __catchResult("FAIL", ::Catch::SourceLineInfo(evt.file(),
static_cast<std::size_t>( evt.line())),
"", Catch::ResultDisposition::Normal);
__catchResult << format + ::Catch::StreamEndStop();
__catchResult.captureResult(Catch::ResultWas::ExplicitFailure);
INTERNAL_CATCH_REACT(__catchResult)
throw Catch::TestFailureException();
std::string expectedPattern {DefaultEventFormatter::formatExpectedPattern(evt.expectedPattern())};
fail("Verify",::Catch::SourceLineInfo(evt.file(),evt.line()),expectedPattern,format);
}
virtual void handle(const NoMoreInvocationsVerificationEvent &evt) override {
std::string format(formatLineNumber(evt.file(), evt.line()) + ": " + _formatter.format(evt));
Catch::ResultBuilder __catchResult("FAIL", ::Catch::SourceLineInfo(evt.file(),
static_cast<std::size_t>( evt.line())),
"", Catch::ResultDisposition::Normal);
__catchResult << format + ::Catch::StreamEndStop();
__catchResult.captureResult(Catch::ResultWas::ExplicitFailure);
INTERNAL_CATCH_REACT(__catchResult)
throw Catch::TestFailureException();
fail("VerifyNoMoreInvocations",::Catch::SourceLineInfo(evt.file(),evt.line()),"",format);
}
};
......@@ -5302,7 +5325,7 @@ namespace fakeit {
#ifdef _MSC_VER
namespace fakeit {
typedef unsigned long DWORD;
typedef unsigned long dword_;
struct TypeDescriptor {
TypeDescriptor() :
......@@ -5315,7 +5338,7 @@ namespace fakeit {
}
char *ptrToVTable;
DWORD spare;
dword_ spare;
char name[8];
};
......@@ -5339,9 +5362,9 @@ namespace fakeit {
}
const std::type_info *pTypeDescriptor;
DWORD numContainedBases;
dword_ numContainedBases;
struct PMD where;
DWORD attributes;
dword_ attributes;
};
template<typename C, typename... baseclasses>
......@@ -5363,9 +5386,9 @@ namespace fakeit {
delete[] pBaseClassArray;
}
DWORD signature;
DWORD attributes;
DWORD numBaseClasses;
dword_ signature;
dword_ attributes;
dword_ numBaseClasses;
RTTIBaseClassDescriptor **pBaseClassArray;
template<typename BaseType>
......@@ -5398,11 +5421,11 @@ namespace fakeit {
{
}
DWORD signature;
DWORD offset;
DWORD cdOffset;
DWORD typeDescriptorOffset;
DWORD classDescriptorOffset;
dword_ signature;
dword_ offset;
dword_ cdOffset;
dword_ typeDescriptorOffset;
dword_ classDescriptorOffset;
#else
RTTICompleteObjectLocator(const std::type_info &info) :
signature(0), offset(0), cdOffset(0),
......@@ -5414,9 +5437,9 @@ namespace fakeit {
delete pClassDescriptor;
}
DWORD signature;
DWORD offset;
DWORD cdOffset;
dword_ signature;
dword_ offset;
dword_ cdOffset;
const std::type_info *pTypeDescriptor;
struct RTTIClassHierarchyDescriptor<C, baseclasses...> *pClassDescriptor;
#endif
......@@ -5896,7 +5919,8 @@ namespace fakeit {
std::vector<std::shared_ptr<Destructible>> &_methodMocks;
std::vector<unsigned int> &_offsets;
unsigned int getOffset(unsigned int id) {
unsigned int getOffset(unsigned int id) const
{
unsigned int offset = 0;
for (; offset < _offsets.size(); offset++) {
if (_offsets[offset] == id) {
......@@ -5950,14 +5974,18 @@ namespace fakeit {
}
void Reset() {
_methodMocks = {{}};
_methodMocks = {};
_methodMocks.resize(VTUtils::getVTSize<C>());
_members = {};
_offsets = {};
_offsets = {};
_offsets.resize(VTUtils::getVTSize<C>());
_cloneVt.copyFrom(originalVtHandle.restore());
}
void Clear()
{
}
template<int id, typename R, typename ... arglist>
void stubMethod(R(C::*vMethod)(arglist...), MethodInvocationHandler<R, arglist...> *methodInvocationHandler) {
auto offset = VTUtils::getOffset(vMethod);
......@@ -6369,7 +6397,7 @@ namespace fakeit {
}
struct Matcher : public TypedMatcher<T> {
virtual bool matches(const T &) const {
virtual bool matches(const T &) const override {
return true;
}
......@@ -6756,7 +6784,7 @@ namespace fakeit {
template<typename R, typename ... arglist>
class RecordedMethodBody : public MethodInvocationHandler<R, arglist...>, public ActualInvocationsSource {
class RecordedMethodBody : public MethodInvocationHandler<R, arglist...>, public ActualInvocationsSource, public ActualInvocationsContainer {
struct MatchedInvocationHandler : ActualInvocationHandler<R, arglist...> {
......@@ -6844,11 +6872,14 @@ namespace fakeit {
_invocationHandlers.push_back(destructable);
}
void clear() {
void reset() {
_invocationHandlers.clear();
_actualInvocations.clear();
}
void clear() override {
_actualInvocations.clear();
}
R handleMethodInvocation(const typename fakeit::production_arg<arglist>::type... args) override {
unsigned int ordinal = Invocation::nextInvocationOrdinal();
......@@ -7896,12 +7927,27 @@ namespace fakeit {
}
}
void reset() {
void initDataMembersIfOwner()
{
if (_isOwner) {
FakeObject<C, baseclasses...> *fake = reinterpret_cast<FakeObject<C, baseclasses...> *>(_instance);
fake->initializeDataMembersArea();
}
}
void reset() {