re-arrange tests according to layer structure
the buildsystem will now pick up and link all test cases according to the layer, e.g. backend tests will automatically be linked against the backend + library solely.
This commit is contained in:
parent
8d88ffcdff
commit
ada5cefaaf
257 changed files with 430 additions and 456 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
file.c - file handling
|
||||
FILE-HANDLING - file access and handling
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
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 "include/logging.h"
|
||||
#include "lib/mutex.h"
|
||||
|
|
@ -29,12 +31,12 @@
|
|||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
//NOBUG_DEFINE_FLAG_PARENT (file, file_all);
|
||||
|
||||
LUMIERA_ERROR_DEFINE (FILE_CHANGED, "File changed unexpected");
|
||||
LUMIERA_ERROR_DEFINE (FILE_NOMMAPINGS, "MMapings (chunksize/bias) not initialized");
|
||||
|
||||
|
||||
|
||||
LumieraFile
|
||||
lumiera_file_init (LumieraFile self, const char* name, int flags)
|
||||
{
|
||||
|
|
@ -54,13 +54,13 @@
|
|||
** \code NOBUG_LOG='progress:INFO' ./lumiera \endcode
|
||||
**
|
||||
** @todo logging to files? NOBUG_LOG='progress:INFO@file(name=filename)' api to set this statically up by the program will follow --cehteh
|
||||
** @todo review this documentation ################################################################################################################################
|
||||
*/
|
||||
|
||||
|
||||
#include <nobug.h>
|
||||
|
||||
#ifndef LUMIERA_LOGGING_CXX
|
||||
/// magic to generate NoBug definitions
|
||||
#ifndef LUMIERA_NOBUG_INIT_CPP
|
||||
#undef NOBUG_DECLARE_ONLY
|
||||
#define NOBUG_DECLARE_ONLY 1
|
||||
#endif
|
||||
|
|
@ -190,16 +190,9 @@ NOBUG_CPP_DEFINE_FLAG_PARENT ( gui_event, all);
|
|||
|
||||
|
||||
|
||||
#ifndef LUMIERA_LOGGING_CXX
|
||||
#ifndef LUMIERA_NOBUG_INIT_CPP
|
||||
#undef NOBUG_DECLARE_ONLY
|
||||
#define NOBUG_DECLARE_ONLY 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/*
|
||||
// Local Variables:
|
||||
// mode: C
|
||||
// c-file-style: "gnu"
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Error - Lumiera Exception Interface
|
||||
ERROR-EXCEPTION - Lumiera exception classes
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
|
@ -21,6 +21,16 @@
|
|||
* *****************************************************/
|
||||
|
||||
|
||||
/** @file error-exception.cpp
|
||||
** implementation of C++-style error handling.
|
||||
** This compilation unit defines a custom exception class hierarchy,
|
||||
** and is tightly integrated with the C-style error handling.
|
||||
**
|
||||
** @see error-state.c
|
||||
** @see error.hpp
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
error.c - Lumiera Error handling
|
||||
ERROR-STATE - Lumiera C error flag implementation
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,16 +17,25 @@
|
|||
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 <pthread.h>
|
||||
* *****************************************************/
|
||||
|
||||
|
||||
/** @file error-state.c
|
||||
** implementation of C-style error handling in Lumiera.
|
||||
** This implementation is based on a thread local error flag.
|
||||
** C++ code uses a custom exception hierarchy, which automatically
|
||||
** sets the error flag whenever an exception is thrown.
|
||||
**
|
||||
** @see error.h
|
||||
** @see error-exception.cpp
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#include "lib/error.h"
|
||||
|
||||
/**
|
||||
* @file
|
||||
* C Error handling in Lumiera.
|
||||
*/
|
||||
#include <pthread.h>
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
error.h - Lumiera Error handling
|
||||
ERROR.h - Lumiera Error handling interface (C-style)
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,23 +17,42 @@
|
|||
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.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/** @file error.h
|
||||
** Lumiera error handling (C interface).
|
||||
** This header declares the interface for C-style error handling
|
||||
** based on a thread local error flag. This error state is "sticky";
|
||||
** client code is bound to clear the error flag explicitly before
|
||||
** being able to set another error state.
|
||||
**
|
||||
** Error states are tightly integrated with NoBug based logging, as well
|
||||
** as with the exceptions used by the C++ part of the application: throwing
|
||||
** an exception automatically sets the error flag, and by policy, any
|
||||
** catch clause has to check, log and clear the error flag too.
|
||||
**
|
||||
** @see error.hpp C++ interface
|
||||
** @see error-state.c
|
||||
** @see error-exception.cpp
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifndef LUMIERA_ERROR_H
|
||||
#define LUMIERA_ERROR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#elif 0
|
||||
} /*eek, fixes emacs indenting for now*/
|
||||
} /* fixes broken emacs indenting */
|
||||
#endif
|
||||
|
||||
|
||||
#include <nobug.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
* C Error handling in Lumiera, header.
|
||||
*/
|
||||
|
||||
typedef const char* lumiera_err;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
ERROR.hpp - Lumiera Exception Interface
|
||||
ERROR.hpp - Lumiera Exception Interface (C++)
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008,2010 Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
|
@ -21,6 +21,21 @@
|
|||
*/
|
||||
|
||||
|
||||
/** @file error.hpp
|
||||
** Lumiera error handling (C++ interface).
|
||||
** This header declares the Lumiera exception hierarchy,
|
||||
** plus some of the most commonly used error flag values.
|
||||
** Within Lumiera, C-style error states and C++-style exceptions
|
||||
** are tightly integrated. Creating an exception sets the error flag,
|
||||
** and there are helpers available to throw an exception automatically
|
||||
** when a non-cleare error state is detected.
|
||||
**
|
||||
** @see error-state.c
|
||||
** @see error.hpp
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifndef LUMIERA_ERROR_HPP_
|
||||
#define LUMIERA_ERROR_HPP_
|
||||
|
||||
|
|
@ -95,7 +110,7 @@ namespace lumiera {
|
|||
|
||||
|
||||
|
||||
/* === Exception Sub-categories === */
|
||||
/* === Exception sub-categories === */
|
||||
|
||||
namespace error {
|
||||
|
||||
|
|
@ -244,7 +259,7 @@ namespace lumiera {
|
|||
* if NoBug is used, redefine some macros
|
||||
* to rather throw Lumiera Errors instead of aborting
|
||||
*/
|
||||
#if 0 /*This will not work, nobug aborts are hard and may hold some locks, we discussed that before -- cehteh */
|
||||
#if 0 ///////////////////////////////////TODO disabled for now. NoBug aborts are hard and may hold some locks. There are hooks to allow throwing from NoBug TODO use them....
|
||||
#ifdef NOBUG_ABORT
|
||||
#undef NOBUG_ABORT
|
||||
#define LUMIERA_NOBUG_LOCATION \
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
logging.cpp - Configure basic nobug logging
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, 2009 Christian Thaeter <ct@pipapo.org>
|
||||
Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
|
||||
#define LUMIERA_LOGGING_CXX
|
||||
#include "include/logging.h"
|
||||
|
||||
/*
|
||||
// Local Variables:
|
||||
// mode: C++
|
||||
// c-file-style: "gnu"
|
||||
// indent-tabs-mode: nil
|
||||
// End:
|
||||
*/
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
NoBugInit - pull up NoBug automagically in static initialisation
|
||||
NoBugInit - NoBug static initialisation and definition of logging vars
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2009, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
|
@ -23,6 +23,10 @@
|
|||
|
||||
#include "lib/nobug-init.hpp"
|
||||
|
||||
/// magic to generate NoBug logging definitions
|
||||
#define LUMIERA_NOBUG_INIT_CPP
|
||||
#include "include/logging.h"
|
||||
|
||||
|
||||
|
||||
namespace lumiera {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
QUERYDIAGNOSTICS.hpp - helpers for writing tests covering config queries
|
||||
QUERY-DIAGNOSTICS.hpp - helpers for writing tests covering config queries
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef LIB_QUERY_TEST_QUERYDIAGNOSTICS_H
|
||||
#define LIB_QUERY_TEST_QUERYDIAGNOSTICS_H
|
||||
#ifndef LIB_QUERY_DIAGNOSTICS_H
|
||||
#define LIB_QUERY_DIAGNOSTICS_H
|
||||
|
||||
|
||||
#include "lib/format-string.hpp"
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
/*
|
||||
Time - convenience wrapper for working with gavl_time in C++
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
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 "lib/time/timevalue.hpp"
|
||||
#include "lib/time.h"
|
||||
#include "lib/util-quant.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <boost/rational.hpp>
|
||||
|
||||
using std::string;
|
||||
using util::floordiv;
|
||||
|
||||
|
||||
namespace lib {
|
||||
namespace time {
|
||||
|
||||
|
||||
|
||||
/** @note the allowed time range is explicitly limited to help overflow protection */
|
||||
const Time Time::MAX ( TimeValue::buildRaw_(+std::numeric_limits<gavl_time_t>::max() / 30) );
|
||||
const Time Time::MIN ( TimeValue::buildRaw_(-_raw(Time::MAX) ) );
|
||||
const Time Time::ZERO;
|
||||
|
||||
const Time Time::ANYTIME(Time::MAX);
|
||||
const Time Time::NEVER (Time::MIN);
|
||||
|
||||
const Offset Offset::ZERO (Time::ZERO);
|
||||
|
||||
|
||||
|
||||
/** convenience constructor to build an
|
||||
* internal Lumiera Time value from the usual parts
|
||||
* of an sexagesimal time specification. Arbitrary integral
|
||||
* values are acceptable and will be summed up accordingly.
|
||||
* The minute and hour part can be omitted.
|
||||
* @warning internal Lumiera time values refer to an
|
||||
* implementation dependent time origin/scale.
|
||||
* The given value will be used as-is, without
|
||||
* any further adjustments.
|
||||
*/
|
||||
Time::Time ( long millis
|
||||
, uint secs
|
||||
, uint mins
|
||||
, uint hours
|
||||
)
|
||||
: TimeValue(lumiera_build_time (millis,secs,mins,hours))
|
||||
{ }
|
||||
|
||||
|
||||
/** convenience constructor to build an Time value
|
||||
* from a fraction of seconds, given as rational number.
|
||||
* An example would be to the time unit of a framerate.
|
||||
*/
|
||||
Time::Time (FSecs const& fractionalSeconds)
|
||||
: TimeValue(lumiera_rational_to_time (fractionalSeconds))
|
||||
{ }
|
||||
|
||||
|
||||
/** displaying an internal Lumiera Time value
|
||||
* for diagnostic purposes or internal reporting.
|
||||
* @warning internal Lumiera time values refer to an
|
||||
* implementation dependent time origin/scale.
|
||||
* @return string rendering of the actual, underlying
|
||||
* implementation value, as \c h:m:s:ms
|
||||
*/
|
||||
Time::operator string() const
|
||||
{
|
||||
return string (lumiera_tmpbuf_print_time (t_));
|
||||
}
|
||||
|
||||
TimeVar::operator string() const
|
||||
{
|
||||
return string (lumiera_tmpbuf_print_time (t_));
|
||||
}
|
||||
|
||||
|
||||
/** @internal backdoor to sneak in a raw time value
|
||||
* bypassing any normalisation and limiting */
|
||||
TimeValue
|
||||
TimeValue::buildRaw_ (gavl_time_t raw)
|
||||
{
|
||||
return reinterpret_cast<TimeValue const&> (raw);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** predefined constant for PAL framerate */
|
||||
const FrameRate FrameRate::PAL (25);
|
||||
const FrameRate FrameRate::NTSC (30000,1001);
|
||||
|
||||
|
||||
/** @return time span of one frame of this rate,
|
||||
* cast into internal Lumiera time scale */
|
||||
Duration
|
||||
FrameRate::duration() const
|
||||
{
|
||||
if (0 == *this)
|
||||
throw error::Logic ("Impossible to quantise to an zero spaced frame grid"
|
||||
, error::LUMIERA_ERROR_BOTTOM_VALUE);
|
||||
|
||||
return Duration (1, *this);
|
||||
}
|
||||
|
||||
|
||||
Offset
|
||||
operator* (boost::rational<int64_t> factor, Offset const& o)
|
||||
{
|
||||
boost::rational<int64_t> distance (_raw(o));
|
||||
distance *= factor;
|
||||
gavl_time_t microTicks = floordiv (distance.numerator(), distance.denominator());
|
||||
return Offset(TimeValue(microTicks));
|
||||
}
|
||||
|
||||
|
||||
/** offset by the given number of frames. */
|
||||
Offset::Offset (int64_t count, FrameRate const& fps)
|
||||
: TimeValue (count? (count<0? -1:+1) * lumiera_framecount_to_time (::abs(count), fps)
|
||||
: _raw(Duration::NIL))
|
||||
{ }
|
||||
|
||||
/** duration of the given number of frames.
|
||||
* @note always positive; count used absolute */
|
||||
Duration::Duration (int64_t count, FrameRate const& fps)
|
||||
: TimeValue (count? lumiera_framecount_to_time (abs(count), fps) : _raw(Duration::NIL))
|
||||
{ }
|
||||
|
||||
|
||||
/** constant to indicate "no duration" */
|
||||
const Duration Duration::NIL (Time::ZERO);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}} // namespace lib::Time
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
/*
|
||||
Time - Utilities for handling time
|
||||
Time - Lumiera time handling foundation
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
2010, Stefan Kangas <skangas@skangas.se>
|
||||
2011, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
|
@ -18,19 +19,45 @@
|
|||
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 "lib/time.h"
|
||||
* *****************************************************/
|
||||
|
||||
|
||||
/** @file time.cpp
|
||||
** Lumiera time handling core implementation unit.
|
||||
** This translation unit generates code for the Lumiera internal time wrapper,
|
||||
** based on gavl_time_t, associated constants, marker classes for the derived
|
||||
** time entities (TimeVar, Offset, Duration, TimeSpan, FrameRate) and for the
|
||||
** basic time and frame rate conversion functions.
|
||||
**
|
||||
** Client code includes either time.h (for basics and conversion functions)
|
||||
** or timevalue.hpp (for the time entities), timequant.hpp for grid aligned
|
||||
** time values or timecode.hpp
|
||||
**
|
||||
** @see Time
|
||||
** @see TimeValue
|
||||
** @see Grid
|
||||
** @see TimeValue_test
|
||||
** @see QuantiserBasics_test
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
#include "lib/time.h"
|
||||
#include "lib/time/timevalue.hpp"
|
||||
#include "lib/util-quant.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "lib/tmpbuf.h"
|
||||
}
|
||||
|
||||
#include <limits>
|
||||
#include <math.h>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <boost/rational.hpp>
|
||||
|
||||
using std::string;
|
||||
using util::floordiv;
|
||||
using lib::time::FSecs;
|
||||
using lib::time::FrameRate;
|
||||
|
|
@ -46,6 +73,137 @@ namespace error = lumiera::error;
|
|||
* we need to multiply or divide by 1000 to get correct results. */
|
||||
#define GAVL_TIME_SCALE_MS (GAVL_TIME_SCALE / 1000)
|
||||
|
||||
|
||||
namespace lib {
|
||||
namespace time {
|
||||
|
||||
|
||||
|
||||
/** @note the allowed time range is explicitly limited to help overflow protection */
|
||||
const Time Time::MAX ( TimeValue::buildRaw_(+std::numeric_limits<gavl_time_t>::max() / 30) );
|
||||
const Time Time::MIN ( TimeValue::buildRaw_(-_raw(Time::MAX) ) );
|
||||
const Time Time::ZERO;
|
||||
|
||||
const Time Time::ANYTIME(Time::MAX);
|
||||
const Time Time::NEVER (Time::MIN);
|
||||
|
||||
const Offset Offset::ZERO (Time::ZERO);
|
||||
|
||||
|
||||
|
||||
/** convenience constructor to build an
|
||||
* internal Lumiera Time value from the usual parts
|
||||
* of an sexagesimal time specification. Arbitrary integral
|
||||
* values are acceptable and will be summed up accordingly.
|
||||
* The minute and hour part can be omitted.
|
||||
* @warning internal Lumiera time values refer to an
|
||||
* implementation dependent time origin/scale.
|
||||
* The given value will be used as-is, without
|
||||
* any further adjustments.
|
||||
*/
|
||||
Time::Time ( long millis
|
||||
, uint secs
|
||||
, uint mins
|
||||
, uint hours
|
||||
)
|
||||
: TimeValue(lumiera_build_time (millis,secs,mins,hours))
|
||||
{ }
|
||||
|
||||
|
||||
/** convenience constructor to build an Time value
|
||||
* from a fraction of seconds, given as rational number.
|
||||
* An example would be to the time unit of a framerate.
|
||||
*/
|
||||
Time::Time (FSecs const& fractionalSeconds)
|
||||
: TimeValue(lumiera_rational_to_time (fractionalSeconds))
|
||||
{ }
|
||||
|
||||
|
||||
/** displaying an internal Lumiera Time value
|
||||
* for diagnostic purposes or internal reporting.
|
||||
* @warning internal Lumiera time values refer to an
|
||||
* implementation dependent time origin/scale.
|
||||
* @return string rendering of the actual, underlying
|
||||
* implementation value, as \c h:m:s:ms
|
||||
*/
|
||||
Time::operator string() const
|
||||
{
|
||||
return string (lumiera_tmpbuf_print_time (t_));
|
||||
}
|
||||
|
||||
TimeVar::operator string() const
|
||||
{
|
||||
return string (lumiera_tmpbuf_print_time (t_));
|
||||
}
|
||||
|
||||
|
||||
/** @internal backdoor to sneak in a raw time value
|
||||
* bypassing any normalisation and limiting */
|
||||
TimeValue
|
||||
TimeValue::buildRaw_ (gavl_time_t raw)
|
||||
{
|
||||
return reinterpret_cast<TimeValue const&> (raw);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** predefined constant for PAL framerate */
|
||||
const FrameRate FrameRate::PAL (25);
|
||||
const FrameRate FrameRate::NTSC (30000,1001);
|
||||
|
||||
|
||||
/** @return time span of one frame of this rate,
|
||||
* cast into internal Lumiera time scale */
|
||||
Duration
|
||||
FrameRate::duration() const
|
||||
{
|
||||
if (0 == *this)
|
||||
throw error::Logic ("Impossible to quantise to an zero spaced frame grid"
|
||||
, error::LUMIERA_ERROR_BOTTOM_VALUE);
|
||||
|
||||
return Duration (1, *this);
|
||||
}
|
||||
|
||||
|
||||
Offset
|
||||
operator* (boost::rational<int64_t> factor, Offset const& o)
|
||||
{
|
||||
boost::rational<int64_t> distance (_raw(o));
|
||||
distance *= factor;
|
||||
gavl_time_t microTicks = floordiv (distance.numerator(), distance.denominator());
|
||||
return Offset(TimeValue(microTicks));
|
||||
}
|
||||
|
||||
|
||||
/** offset by the given number of frames. */
|
||||
Offset::Offset (int64_t count, FrameRate const& fps)
|
||||
: TimeValue (count? (count<0? -1:+1) * lumiera_framecount_to_time (::abs(count), fps)
|
||||
: _raw(Duration::NIL))
|
||||
{ }
|
||||
|
||||
/** duration of the given number of frames.
|
||||
* @note always positive; count used absolute */
|
||||
Duration::Duration (int64_t count, FrameRate const& fps)
|
||||
: TimeValue (count? lumiera_framecount_to_time (abs(count), fps) : _raw(Duration::NIL))
|
||||
{ }
|
||||
|
||||
|
||||
/** constant to indicate "no duration" */
|
||||
const Duration Duration::NIL (Time::ZERO);
|
||||
|
||||
|
||||
}} // namespace lib::Time
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ===== implementation of the C API functions ===== */
|
||||
|
||||
|
||||
char*
|
||||
lumiera_tmpbuf_print_time (gavl_time_t time)
|
||||
{
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
TESTING "Error handling" ./test-error
|
||||
TESTING "Error handling" ./test-errorstate
|
||||
|
||||
TEST "no error" <<END
|
||||
return: 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "test configuration system" ./test-config
|
||||
TESTING "test configuration system" ./test-configloader
|
||||
|
||||
TEST "initializing config system" init <<END
|
||||
out: initialized
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "test configuration system" ./test-config
|
||||
TESTING "test configuration system" ./test-configloader
|
||||
|
||||
PLANNED "loading configfile, simple" <<END
|
||||
END
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: common and basic components" ./test-lib --group=common
|
||||
TESTING "Core Component Test Suite: common and basic components" ./test-suite --group=common
|
||||
|
||||
|
||||
|
||||
|
|
@ -708,7 +708,7 @@ return: 0
|
|||
END
|
||||
|
||||
|
||||
TEST "Lumiera Time Wrapper" LumiTime_test <<END
|
||||
TEST "Lumiera Time Wrapper" TimeBasics_test <<END
|
||||
out: .?.:..:..\....
|
||||
return: 0
|
||||
END
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: Asset Manager" ./test-components --group=asset
|
||||
TESTING "Component Test Suite: Asset Manager" ./test-suite --group=asset
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Proc Layer config rules Test Suite" ./test-lib --group=query
|
||||
TESTING "Proc Layer config rules Test Suite" ./test-suite --group=query
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: MObjects and Session/Model" ./test-components --group=session
|
||||
TESTING "Component Test Suite: MObjects and Session/Model" ./test-suite --group=session
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: Builder" ./test-components --group=builder
|
||||
TESTING "Component Test Suite: Builder" ./test-suite --group=builder
|
||||
|
||||
|
||||
TEST "BuilderTool_test" BuilderTool_test <<END
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: Proc-Layer controller" ./test-components --group=controller
|
||||
TESTING "Component Test Suite: Proc-Layer controller" ./test-suite --group=controller
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: Render Engine parts" ./test-components --group=engine
|
||||
TESTING "Component Test Suite: Render Engine parts" ./test-suite --group=engine
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: Player and Output" ./test-components --group=player
|
||||
TESTING "Component Test Suite: Player and Output" ./test-suite --group=player
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Proc Layer combined operations Test Suite" ./test-components --group=operate
|
||||
TESTING "Proc Layer combined operations Test Suite" ./test-suite --group=operate
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: GUI Model Parts" ./test-components --group=gui
|
||||
TESTING "Component Test Suite: GUI Model Parts" ./test-suite --group=gui
|
||||
|
||||
PLANNED "ModelClipTrack_test" ModelClipTrack_test <<END
|
||||
END
|
||||
|
|
|
|||
11
tests/80-regression.tests
Normal file
11
tests/80-regression.tests
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
TESTING "Regression Tests: Known bugs" ./test-suite --group=regressiongui
|
||||
|
||||
|
||||
|
||||
TEST "Smile test" HelloBug_test <<END
|
||||
err: hello sunshine
|
||||
END
|
||||
|
||||
|
||||
PLANNED "Suicide test" ElectricSuicide_test <<END
|
||||
END
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
# Copyright (C) Lumiera.org
|
||||
# 2007-2008, Christian Thaeter <ct@pipapo.org>
|
||||
# Hermann Vosseler <Ichthyostega@web.de>
|
||||
#
|
||||
# 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.
|
||||
|
||||
tests_srcdir = $(top_srcdir)/tests
|
||||
|
||||
|
||||
check_PROGRAMS += test-error
|
||||
test_error_SOURCES = $(tests_srcdir)/library/test-error.c
|
||||
test_error_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_error_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-locking
|
||||
test_locking_SOURCES = $(tests_srcdir)/library/test-locking.c
|
||||
test_locking_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_locking_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-llist
|
||||
test_llist_SOURCES = $(tests_srcdir)/library/test-llist.c
|
||||
test_llist_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_llist_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-mpool
|
||||
test_mpool_SOURCES = $(tests_srcdir)/library/test-mpool.c
|
||||
test_mpool_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_mpool_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-psplay
|
||||
test_psplay_SOURCES = $(tests_srcdir)/library/test-psplay.c
|
||||
test_psplay_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src/
|
||||
test_psplay_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-safeclib
|
||||
test_safeclib_SOURCES = $(tests_srcdir)/library/test-safeclib.c
|
||||
test_safeclib_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_safeclib_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-time
|
||||
test_time_SOURCES = $(tests_srcdir)/library/test-time.c
|
||||
test_time_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_time_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-luid
|
||||
test_luid_SOURCES = $(tests_srcdir)/library/test-luid.c
|
||||
test_luid_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_luid_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-filedescriptors
|
||||
test_filedescriptors_SOURCES = $(tests_srcdir)/backend/test-filedescriptors.c
|
||||
test_filedescriptors_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_filedescriptors_LDADD = $(LUMIERA_LIBS) liblumierabackend.la liblumieracommon.la liblumieraproc.la
|
||||
# FIXME stray dependencies on proc
|
||||
|
||||
check_PROGRAMS += test-filehandles
|
||||
test_filehandles_SOURCES = $(tests_srcdir)/backend/test-filehandles.c
|
||||
test_filehandles_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_filehandles_LDADD = $(LUMIERA_LIBS) liblumierabackend.la liblumieracommon.la liblumieraproc.la
|
||||
# FIXME stray dependencies on proc
|
||||
|
||||
check_PROGRAMS += test-filemmap
|
||||
test_filemmap_SOURCES = $(tests_srcdir)/backend/test-filemmap.c
|
||||
test_filemmap_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src/
|
||||
test_filemmap_LDADD = $(LUMIERA_LIBS) liblumierabackend.la liblumieracommon.la liblumieraproc.la
|
||||
# FIXME stray dependencies on proc
|
||||
|
||||
#check_PROGRAMS += test-resourcecollector
|
||||
#test_resourcecollector_SOURCES = $(tests_srcdir)/backend/test-resourcecollector.c
|
||||
#test_resourcecollector_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src/
|
||||
#test_resourcecollector_LDADD = $(LUMIERA_LIBS) liblumiera.la liblumierabackend.la liblumieraproc.la liblumieracommon.la
|
||||
|
||||
check_PROGRAMS += test-fileheader
|
||||
test_fileheader_SOURCES = $(tests_srcdir)/backend/test-fileheader.c
|
||||
test_fileheader_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src/
|
||||
test_fileheader_LDADD = $(LUMIERA_LIBS) liblumierabackend.la liblumieracommon.la liblumieraproc.la
|
||||
# FIXME stray dependencies on proc
|
||||
|
||||
# FIXME stray dependencies on proc
|
||||
|
||||
check_PROGRAMS += test-slist
|
||||
test_slist_SOURCES = $(tests_srcdir)/library/test-slist.c
|
||||
test_slist_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_slist_LDADD = $(LUMIERA_LIBS) liblumiera.la
|
||||
|
||||
check_PROGRAMS += test-config
|
||||
test_config_SOURCES = $(tests_srcdir)/common/test-config.c
|
||||
test_config_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src/
|
||||
test_config_LDADD = $(LUMIERA_LIBS) liblumieracommon.la liblumieraproc.la liblumierabackend.la
|
||||
# FIXME stray dependencies on proc
|
||||
|
||||
check_LTLIBRARIES += examplepluginc.la
|
||||
examplepluginc_la_SOURCES = $(tests_srcdir)/plugin/examplepluginc/example_plugin.c
|
||||
examplepluginc_la_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -DLUMIERA_PLUGIN -I$(top_srcdir)/src/
|
||||
examplepluginc_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /dev/null -shrext .lum
|
||||
|
||||
check_PROGRAMS += test-interfaces
|
||||
test_interfaces_SOURCES = $(tests_srcdir)/common/test-interfaces.c
|
||||
test_interfaces_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror
|
||||
test_interfaces_LDADD = $(LUMIERA_LIBS) liblumieracommon.la liblumierabackend.la liblumieraproc.la
|
||||
# FIXME stray dependency on backend, proc
|
||||
|
||||
check_PROGRAMS += test-threads
|
||||
test_threads_SOURCES = $(tests_srcdir)/backend/test-threads.c
|
||||
test_threads_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src/
|
||||
test_threads_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
|
||||
test_threads_LDADD = liblumierabackend.la liblumieracommon.la liblumieraproc.la
|
||||
|
||||
check_PROGRAMS += test-threadpool
|
||||
test_threadpool_SOURCES = $(tests_srcdir)/backend/test-threadpool.c
|
||||
test_threadpool_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src/
|
||||
test_threadpool_CFLAGS = $(AM_CFLAGS) $(LUMIERA_BACKEND_CFLAGS)
|
||||
test_threadpool_LDADD = $(LUMIERA_LIBS) liblumierabackend.la liblumieracommon.la liblumieraproc.la
|
||||
|
||||
TESTS = $(tests_srcdir)/test.sh
|
||||
1
tests/backend/DIR_INFO
Normal file
1
tests/backend/DIR_INFO
Normal file
|
|
@ -0,0 +1 @@
|
|||
backend testsuite
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-filedescriptors.c
|
||||
TEST-FILEDESCRIPTORS
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,10 @@
|
|||
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 "lib/safeclib.h"
|
||||
|
||||
#include "common/config.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-filehandles.c - test filehandle management
|
||||
TEST-FILEHANDLES - test filehandle management
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,10 @@
|
|||
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 "lib/llist.h"
|
||||
#include "lib/tmpbuf.h"
|
||||
#include "common/config.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-fileheader.c - File identification
|
||||
TEST-FILEHEADER - File identification
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2010, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
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 "backend/backend.h"
|
||||
#include "backend/fileheader.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-files.c - test file management
|
||||
TEST-FILEMAP - test file management
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
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 <stdio.h>
|
||||
//#include <string.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-resourcecollector.c - test the resource collector
|
||||
TEST-RESOURCECOLLECTOR - test the resource collector
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
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 "backend/resourcecollector.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-threadpool.c - test thread pool creation and usage
|
||||
TEST-THREADPOOL - test thread pool creation and usage
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2009, Michael Ploujnikov <ploujj@gmail.com>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
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 "lib/test/test.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-threads.c - test thread management
|
||||
TEST-THREADS - test thread management
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
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 <stdio.h>
|
||||
//#include <string.h>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
tests against reported bugs
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-config.c - test the config system
|
||||
TEST-CONFIGLOADER - test the config system
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -18,7 +18,10 @@
|
|||
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 "lib/tmpbuf.h"
|
||||
|
||||
#include "common/config.h"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
test-interfaces.c - test interfaces declaration and implementation
|
||||
TEST-INTERFACES - test interfaces declaration and implementation
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
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/interface.h"
|
||||
#include "common/interfaceregistry.h"
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue