Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
make-clip-test.cpp
Go to the documentation of this file.
1/*
2 MakeClip(Test) - create a Clip from a Media Asset
3
4 Copyright (C)
5 2008, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12* *****************************************************************/
13
19#include "include/logging.h"
20#include "lib/test/run.hpp"
21#include "lib/util.hpp"
22
25#include "steam/asset/media.hpp"
29#include "lib/depend-inject.hpp"
30
31using util::contains;
32using util::isnil;
33using std::string;
34
35using std::static_pointer_cast; //TODO only temporarily;
36
37namespace steam {
38namespace asset{
39namespace test {
40
42 ::Local<vault::test::MediaAccessMock>;
43
44
45
46
47 /*******************************************************************/
52 class MakeClip_test : public Test
53 {
56
57 virtual void run (Arg)
58 {
59 MediaAccessMock useMockMedia;
60
61
62 PM mm = asset::Media::create("test-1", VIDEO);
63 PC cc = mm->createClip();
64 PM cm = cc->getMedia();
65
66 CHECK (cm);
67 CHECK (!isnil (cc->getLength()));
68 CHECK (cm->ident.category.hasKind (VIDEO));
69 CHECK (cm->getFilename() == mm->getFilename());
70TODO ("implement Processing Pattern!!!");
71// CHECK (cm->howtoProc() == mm->howtoProc());
72 CHECK (cm->ident.org == mm->ident.org);
73 CHECK (dependencyCheck (cm,mm));
74
75 TRACE (asset_mem, "leaving MakeClip_test::run()");
76 TRACE (mobject_mem, "leaving MakeClip_test::run()");
77 }
78
79
80 };
81
82
84 LAUNCHER (MakeClip_test, "function asset");
85
86
87
88}}} // namespace steam::asset::test
Small helper and diagnostic functions related to Asset and AssetManager.
Steam-Layer Interface: Asset Lookup and Organisation.
This framework allows to (re)configure the lib::Depend front-end for dependency-injection.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Definition p.hpp:77
static MediaFactory create
storage for the static MediaFactory instance
Definition media.hpp:75
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
Per type specific configuration of instances created as service dependencies.
This header is for including and configuring NoBug.
Unit test helper to access an emulated media file.
Media data represented a specific kind of Asset.
MObject in the Session to represent a clip on the timeline.
lib::DependInject< vault::MediaAccessFacade > ::Local< vault::test::MediaAccessMock > MediaAccessMock
The asset subsystem of the Steam-Layer.
bool dependencyCheck(lib::P< CHI > child, lib::P< PAR > parent)
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
Definition util.hpp:230
bool isnil(lib::time::Duration const &dur)
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Definition run.hpp:116
a family of time value like entities and their relationships.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...