TDBS (test driven brain storming) :-)

This commit is contained in:
Fischlurch 2007-09-03 02:33:47 +02:00
parent f86493e466
commit 1cadae2d75
19 changed files with 836 additions and 1 deletions

View file

@ -1,4 +1,4 @@
TESTING "Component Test Suite: ALL" ./test-components
TESTING "Component Test Suite: common and basic components" ./test-components --group=common

14
tests/51asset.tests Normal file
View file

@ -0,0 +1,14 @@
TESTING "Component Test Suite: Asset Manager" ./test-components --group=asset
PLANNED "CreateAsset_test" CreateAsset_test <<END
END
PLANNED "DeleteAsset_test" DeleteAsset_test <<END
END
PLANNED "DependantAssets_test" DependantAssets_test <<END
END

6
tests/52engine.tests Normal file
View file

@ -0,0 +1,6 @@
TESTING "Component Test Suite: Render Engine parts" ./test-components --group=engine
PLANNED "SourceNode_test" SourceNode_test <<END
END

14
tests/53session.tests Normal file
View file

@ -0,0 +1,14 @@
TESTING "Component Test Suite: MObjects and Session/EDL" ./test-components --group=session
PLANNED "AddClip_test" AddClip_test <<END
END
PLANNED "DeleteClip_test" DeleteClip_test <<END
END
PLANNED "RebuildFixture_test" RebuildFixture_test <<END
END

6
tests/54builder.tests Normal file
View file

@ -0,0 +1,6 @@
TESTING "Component Test Suite: Builder" ./test-components --group=builder
PLANNED "BuildSegment_test" BuildSegment_test <<END
END

6
tests/55controller.tests Normal file
View file

@ -0,0 +1,6 @@
TESTING "Component Test Suite: Proc-Layer controller" ./test-components --group=controller
#

View file

@ -0,0 +1,6 @@
TESTING "Proc Layer combined operations Test Suite" ./test-components --group=operate
PLANNED "RenderSegment_test" RenderSegment_test <<END
END

View file

@ -0,0 +1,63 @@
/*
CreateAsset(Test) - constructing and registering Assets
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace asset
{
namespace test
{
/***********************************************************************
* @test creating new Assets and registering them with the AssetManager.
* @see proc_interface::AssetManager#reg
*/
class CreateAsset_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (CreateAsset_test, "unit asset");
} // namespace test
} // namespace asset

View file

@ -0,0 +1,67 @@
/*
DeleteAsset(Test) - deleting and Asset with all dependencies
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace asset
{
namespace test
{
/*******************************************************************
* @test deleting an Asset includes removing all dependant Assets
* and all MObjects relying on these. Especially this means
* breaking all links between the involved Objects, so the
* shared-ptrs can do the actual cleanup.
* @see asset::Asset#unlink
* @see mobject::MObject#unlink
*/
class DeleteAsset_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (DeleteAsset_test, "function asset");
} // namespace test
} // namespace asset

View file

@ -0,0 +1,65 @@
/*
DependantAssets(Test) - unittest for the object creating factory
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace asset
{
namespace test
{
/*******************************************************************
* @test the handling of Assets dependant on other Assets and the
* enabling/disabling of Assets.
* @see asset::Asset
* @see asset::Clip
*/
class DependantAssets_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (DependantAssets_test, "unit function asset");
} // namespace test
} // namespace asset

View file

@ -0,0 +1,58 @@
/*
TESTCLIPASSET.hpp - test Media-Asset (clip) for checking Assets and MObjects
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef ASSET_TESTCLIPASSET_H
#define ASSET_TESTCLIPASSET_H
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace asset
{
/**
* An asset::Media instance Test Clip for checking
* various Asset operations and for creating
* dependent Clip-MObjects.
*
*/
class TestClipAsset
{
public:
};
} // namespace asset
#endif

View file

@ -0,0 +1,62 @@
/*
SourceNode(Test) - unit test of the source readering render node
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace engine
{
namespace test
{
/*******************************************************************
* @test the source reading render node.
*/
class SourceNode_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (SourceNode_test, "unit engine");
} // namespace test
} // namespace engine

View file

@ -0,0 +1,67 @@
/*
BuildSegment(Test) - building the render-tree for a segment of the EDL
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace mobject
{
namespace builder
{
namespace test
{
/*******************************************************************
* @test the builder core functionality: create a render pipeline
* for a given segment of the EDL.
*/
class BuildSegment_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (BuildSegment_test, "function builder");
} // namespace test
} // namespace builder
} // namespace mobject

View file

@ -0,0 +1,73 @@
/*
RenderSegment(Test) - Proc-Layer Integrationtest
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace mobject
{
namespace controller
{
namespace test
{
/*******************************************************************
* @test create a render process from a given segment of the EDL.
* Basically this includes cooperation of all parts of the
* Cinelerra Proc Layer. For a prepared test-EDL we invoke the
* controller to create a render process. This includes building
* the render pipeline. Finally, we analyze all the created
* Structures.
* @note this test doesn't cover the actual rendering.
* @see proc_interface::ControllerFacade
*/
class RenderSegment_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (RenderSegment_test, "function operate");
} // namespace test
} // namespace controller
} // namespace mobject

View file

@ -0,0 +1,68 @@
/*
AddClip(Test) - adding an Clip-MObject to the EDL/Session
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace mobject
{
namespace session
{
namespace test
{
/*******************************************************************
* @test adding an test clip to the EDL/Session.
* @see mobject::session::Clip
* @see mobject::session::EDL
*/
class AddClip_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (AddClip_test, "unit session");
} // namespace test
} // namespace session
} // namespace mobject

View file

@ -0,0 +1,68 @@
/*
DeleteClip(Test) - removing an Clip-MObject from the Session
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace mobject
{
namespace session
{
namespace test
{
/*******************************************************************
* @test removing a test clip from the EDL.
* @see mobject::session::Clip
* @see mobject::session::EDL
*/
class DeleteClip_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (DeleteClip_test, "function session");
} // namespace test
} // namespace session
} // namespace mobject

View file

@ -0,0 +1,69 @@
/*
RebuildFixture(Test) - (re)building the explicit placements
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace mobject
{
namespace session
{
namespace test
{
/*******************************************************************
* @test (re)building the ExplicitPlacement objects from the objects
* placed into the Session/EDL.
* @see mobject::session::Fixture
* @see mobject::ExplicitPlacement
*/
class RebuildFixture_test : public Test
{
virtual void run(Arg arg)
{
}
};
/** Register this test class... */
LAUNCHER (RebuildFixture_test, "unit session");
} // namespace test
} // namespace session
} // namespace mobject

View file

@ -0,0 +1,60 @@
/*
TESTCLIP.hpp - test clip (stub) for checking EDL/Session functionality
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef MOBJECT_SESSION_TESTCLIP_H
#define MOBJECT_SESSION_TESTCLIP_H
#include "common/test/run.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace mobject
{
namespace session
{
/**
* Sample or Test Clip for checking
* various EDL, session and builder operations.
*
*/
class TestClip
{
public:
};
} // namespace session
} // namespace mobject
#endif

View file

@ -0,0 +1,63 @@
/*
TESTSESSION1.hpp - complete session configuration use for various tests
Copyright (C) CinelerraCV
2007, Christian Thaeter <ct@pipapo.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef MOBJECT_SESSION_TESTCLIP_H
#define MOBJECT_SESSION_TESTCLIP_H
#include "proc/mobject/session/session.hpp"
#include "common/error.hpp"
//#include "common/factory.hpp"
//#include "common/util.hpp"
//#include <boost/format.hpp>
#include <iostream>
//using boost::format;
using std::string;
using std::cout;
namespace mobject
{
namespace session
{
typedef std::auto_ptr<Session> PSession; /////TODO
/**
* Create a Test Session configuration usable for various Tests.
* This Session holds two Clips and corresponds to "Example1"
* in the UML design.
*/
PSession Testsession1 ()
{
UNIMPLEMENTED ("Test-Session 1");
};
} // namespace session
} // namespace mobject
#endif