Unit tests update
This commit is contained in:
parent
3a652a0d9e
commit
3a3717fa7a
13
.travis.yml
13
.travis.yml
|
@ -46,20 +46,15 @@ matrix:
|
|||
addons:
|
||||
coverity_scan:
|
||||
project:
|
||||
name: "gansm/finalcut"
|
||||
description: "Build submitted via Travis CI"
|
||||
name: gansm/finalcut
|
||||
description: Build submitted via Travis CI
|
||||
notification_email: guru.mail@muenster.de
|
||||
build_command_prepend: "autoreconf -v --install --force && ./configure --prefix=/usr && make clean"
|
||||
build_command: "make V=1 -j10"
|
||||
build_command_prepend: autoreconf -v --install --force && ./configure --prefix=/usr CPPFLAGS="-DDEBUG" CXXFLAGS="-g -O0 -DDEBUG" --with-unit-test && make clean
|
||||
build_command: make V=1 -j10 check
|
||||
branch_pattern: master
|
||||
before_install:
|
||||
- lsb_release -a
|
||||
- uname -a
|
||||
script:
|
||||
- autoreconf -v --install --force
|
||||
- ./configure --prefix=/usr
|
||||
- make -j10
|
||||
- make check
|
||||
|
||||
#
|
||||
# Coveralls
|
||||
|
|
|
@ -8,16 +8,19 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -Wall -Werror
|
|||
|
||||
noinst_PROGRAMS = \
|
||||
fobject_test \
|
||||
fmouse_test \
|
||||
fstring_test \
|
||||
fpoint_test \
|
||||
frect_test
|
||||
|
||||
fobject_test_SOURCES = fobject-test.cpp
|
||||
fmouse_test_SOURCES = fmouse-test.cpp
|
||||
fstring_test_SOURCES = fstring-test.cpp
|
||||
fpoint_test_SOURCES = fpoint-test.cpp
|
||||
frect_test_SOURCES = frect-test.cpp
|
||||
|
||||
TESTS = fobject_test \
|
||||
fmouse_test \
|
||||
fstring_test \
|
||||
fpoint_test \
|
||||
frect_test
|
||||
|
|
|
@ -83,10 +83,11 @@ POST_UNINSTALL = :
|
|||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@CPPUNIT_TEST_TRUE@noinst_PROGRAMS = fobject_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ fmouse_test$(EXEEXT) fstring_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ fpoint_test$(EXEEXT) frect_test$(EXEEXT)
|
||||
@CPPUNIT_TEST_TRUE@TESTS = fobject_test$(EXEEXT) fmouse_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ fstring_test$(EXEEXT) fpoint_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ frect_test$(EXEEXT)
|
||||
@CPPUNIT_TEST_TRUE@TESTS = fobject_test$(EXEEXT) fstring_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ fpoint_test$(EXEEXT) frect_test$(EXEEXT)
|
||||
@CPPUNIT_TEST_TRUE@check_PROGRAMS = $(am__EXEEXT_1)
|
||||
subdir = src/test
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
|
@ -104,17 +105,21 @@ CONFIG_HEADER = $(top_builddir)/config.h
|
|||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
@CPPUNIT_TEST_TRUE@am__EXEEXT_1 = fobject_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ fstring_test$(EXEEXT) fpoint_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ frect_test$(EXEEXT)
|
||||
@CPPUNIT_TEST_TRUE@ fmouse_test$(EXEEXT) fstring_test$(EXEEXT) \
|
||||
@CPPUNIT_TEST_TRUE@ fpoint_test$(EXEEXT) frect_test$(EXEEXT)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am__fobject_test_SOURCES_DIST = fobject-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@am_fobject_test_OBJECTS = fobject-test.$(OBJEXT)
|
||||
fobject_test_OBJECTS = $(am_fobject_test_OBJECTS)
|
||||
fobject_test_LDADD = $(LDADD)
|
||||
am__fmouse_test_SOURCES_DIST = fmouse-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@am_fmouse_test_OBJECTS = fmouse-test.$(OBJEXT)
|
||||
fmouse_test_OBJECTS = $(am_fmouse_test_OBJECTS)
|
||||
fmouse_test_LDADD = $(LDADD)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
am__fobject_test_SOURCES_DIST = fobject-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@am_fobject_test_OBJECTS = fobject-test.$(OBJEXT)
|
||||
fobject_test_OBJECTS = $(am_fobject_test_OBJECTS)
|
||||
fobject_test_LDADD = $(LDADD)
|
||||
am__fpoint_test_SOURCES_DIST = fpoint-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@am_fpoint_test_OBJECTS = fpoint-test.$(OBJEXT)
|
||||
fpoint_test_OBJECTS = $(am_fpoint_test_OBJECTS)
|
||||
|
@ -161,9 +166,11 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
|||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
am__v_CXXLD_1 =
|
||||
SOURCES = $(fobject_test_SOURCES) $(fpoint_test_SOURCES) \
|
||||
$(frect_test_SOURCES) $(fstring_test_SOURCES)
|
||||
DIST_SOURCES = $(am__fobject_test_SOURCES_DIST) \
|
||||
SOURCES = $(fmouse_test_SOURCES) $(fobject_test_SOURCES) \
|
||||
$(fpoint_test_SOURCES) $(frect_test_SOURCES) \
|
||||
$(fstring_test_SOURCES)
|
||||
DIST_SOURCES = $(am__fmouse_test_SOURCES_DIST) \
|
||||
$(am__fobject_test_SOURCES_DIST) \
|
||||
$(am__fpoint_test_SOURCES_DIST) $(am__frect_test_SOURCES_DIST) \
|
||||
$(am__fstring_test_SOURCES_DIST)
|
||||
am__can_run_installinfo = \
|
||||
|
@ -524,6 +531,7 @@ top_srcdir = @top_srcdir@
|
|||
@CPPUNIT_TEST_TRUE@AM_LDFLAGS = -L$(top_builddir)/src/.libs -lfinal $(CPPUNIT_LIBS)
|
||||
@CPPUNIT_TEST_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/include -Wall -Werror
|
||||
@CPPUNIT_TEST_TRUE@fobject_test_SOURCES = fobject-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@fmouse_test_SOURCES = fmouse-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@fstring_test_SOURCES = fstring-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@fpoint_test_SOURCES = fpoint-test.cpp
|
||||
@CPPUNIT_TEST_TRUE@frect_test_SOURCES = frect-test.cpp
|
||||
|
@ -580,6 +588,10 @@ clean-noinstPROGRAMS:
|
|||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
fmouse_test$(EXEEXT): $(fmouse_test_OBJECTS) $(fmouse_test_DEPENDENCIES) $(EXTRA_fmouse_test_DEPENDENCIES)
|
||||
@rm -f fmouse_test$(EXEEXT)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(fmouse_test_OBJECTS) $(fmouse_test_LDADD) $(LIBS)
|
||||
|
||||
fobject_test$(EXEEXT): $(fobject_test_OBJECTS) $(fobject_test_DEPENDENCIES) $(EXTRA_fobject_test_DEPENDENCIES)
|
||||
@rm -f fobject_test$(EXEEXT)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(fobject_test_OBJECTS) $(fobject_test_LDADD) $(LIBS)
|
||||
|
@ -602,6 +614,7 @@ mostlyclean-compile:
|
|||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fmouse-test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fobject-test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpoint-test.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frect-test.Po@am__quote@
|
||||
|
@ -834,6 +847,13 @@ fobject_test.log: fobject_test$(EXEEXT)
|
|||
--log-file $$b.log --trs-file $$b.trs \
|
||||
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
fmouse_test.log: fmouse_test$(EXEEXT)
|
||||
@p='fmouse_test$(EXEEXT)'; \
|
||||
b='fmouse_test'; \
|
||||
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
||||
--log-file $$b.log --trs-file $$b.trs \
|
||||
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||
fstring_test.log: fstring_test$(EXEEXT)
|
||||
@p='fstring_test$(EXEEXT)'; \
|
||||
b='fstring_test'; \
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
/***********************************************************************
|
||||
* fmouse-test.cpp - FMouse unit tests *
|
||||
* *
|
||||
* This file is part of the Final Cut widget toolkit *
|
||||
* *
|
||||
* Copyright 2018 Markus Gans *
|
||||
* *
|
||||
* The Final Cut is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public License *
|
||||
* as published by the Free Software Foundation; either version 3 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* The Final Cut 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 Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program. If not, see *
|
||||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
#include <cppunit/BriefTestProgressListener.h>
|
||||
#include <cppunit/CompilerOutputter.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/TestResult.h>
|
||||
#include <cppunit/TestResultCollector.h>
|
||||
#include <cppunit/TestRunner.h>
|
||||
|
||||
#include <final/final.h>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// class FMouse_protected
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
class FMouse_protected : public FMouse
|
||||
{
|
||||
public:
|
||||
virtual bool hasData()
|
||||
{ return true; }
|
||||
|
||||
virtual void setRawData (char[], int)
|
||||
{ }
|
||||
|
||||
virtual void processEvent (struct timeval*)
|
||||
{ }
|
||||
|
||||
short getMaxWidth()
|
||||
{
|
||||
return max_width;
|
||||
}
|
||||
|
||||
short getMaxHeight()
|
||||
{
|
||||
return max_height;
|
||||
}
|
||||
|
||||
FPoint& getNewMousePosition()
|
||||
{
|
||||
return new_mouse_position;
|
||||
}
|
||||
|
||||
long getDblclickInterval()
|
||||
{
|
||||
return dblclick_interval;
|
||||
}
|
||||
|
||||
bool isDblclickTimeout (timeval* t)
|
||||
{
|
||||
return FMouse::isDblclickTimeout(t);
|
||||
}
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// class FMouseTest
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
class FMouseTest : public CPPUNIT_NS::TestFixture
|
||||
{
|
||||
public:
|
||||
FMouseTest()
|
||||
{ }
|
||||
|
||||
protected:
|
||||
void classNameTest();
|
||||
void noArgumentTest();
|
||||
void doubleClickTest();
|
||||
void workspaceSizeTest();
|
||||
|
||||
|
||||
private:
|
||||
// Adds code needed to register the test suite
|
||||
CPPUNIT_TEST_SUITE (FMouseTest);
|
||||
|
||||
// Add a methods to the test suite
|
||||
CPPUNIT_TEST (classNameTest);
|
||||
CPPUNIT_TEST (noArgumentTest);
|
||||
CPPUNIT_TEST (doubleClickTest);
|
||||
CPPUNIT_TEST (workspaceSizeTest);
|
||||
|
||||
// End of test suite definition
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FMouseTest::classNameTest()
|
||||
{
|
||||
FMouse_protected m;
|
||||
const char* const classname1 = m.getClassName();
|
||||
CPPUNIT_ASSERT ( std::strcmp(classname1, "FMouse") == 0 );
|
||||
|
||||
#ifdef F_HAVE_LIBGPM
|
||||
FMouseGPM gpm_mouse;
|
||||
const char* const classname2 = gpm_mouse.getClassName();
|
||||
CPPUNIT_ASSERT ( std::strcmp(classname2, "FMouseGPM") == 0 );
|
||||
#endif
|
||||
|
||||
FMouseX11 x11_mouse;
|
||||
const char* const classname3 = x11_mouse.getClassName();
|
||||
CPPUNIT_ASSERT ( std::strcmp(classname3, "FMouseX11") == 0 );
|
||||
|
||||
FMouseSGR sgr_mouse;
|
||||
const char* const classname4 = sgr_mouse.getClassName();
|
||||
CPPUNIT_ASSERT ( std::strcmp(classname4, "FMouseSGR") == 0 );
|
||||
|
||||
FMouseUrxvt urxvt_mouse;
|
||||
const char* const classname5 = urxvt_mouse.getClassName();
|
||||
CPPUNIT_ASSERT ( std::strcmp(classname5, "FMouseUrxvt") == 0 );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FMouseTest::noArgumentTest()
|
||||
{
|
||||
FMouse_protected mouse;
|
||||
CPPUNIT_ASSERT ( mouse.getPos() == FPoint(0, 0) );
|
||||
CPPUNIT_ASSERT ( mouse.getNewMousePosition() == FPoint(0, 0) );
|
||||
CPPUNIT_ASSERT ( ! mouse.hasEvent() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isLeftButtonPressed() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isLeftButtonReleased() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isLeftButtonDoubleClick() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isRightButtonPressed() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isRightButtonReleased() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isMiddleButtonPressed() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isMiddleButtonReleased() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isShiftKeyPressed() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isControlKeyPressed() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isMetaKeyPressed() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isWheelUp() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isWheelDown() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isMoved() );
|
||||
CPPUNIT_ASSERT ( ! mouse.isInputDataPending() );
|
||||
|
||||
#ifdef F_HAVE_LIBGPM
|
||||
FMouseGPM gpm_mouse;
|
||||
CPPUNIT_ASSERT ( ! gpm_mouse.hasData() );
|
||||
#endif
|
||||
|
||||
FMouseX11 x11_mouse;
|
||||
CPPUNIT_ASSERT ( ! x11_mouse.hasData() );
|
||||
|
||||
FMouseSGR sgr_mouse;
|
||||
CPPUNIT_ASSERT ( ! sgr_mouse.hasData() );
|
||||
|
||||
FMouseUrxvt urxvt_mouse;
|
||||
CPPUNIT_ASSERT ( ! urxvt_mouse.hasData() );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FMouseTest::doubleClickTest()
|
||||
{
|
||||
FMouse_protected mouse;
|
||||
CPPUNIT_ASSERT ( mouse.getDblclickInterval() == 500000 ); // 500 ms
|
||||
timeval tv = { 0, 0 };
|
||||
CPPUNIT_ASSERT ( mouse.isDblclickTimeout(&tv) );
|
||||
|
||||
FObject::getCurrentTime(&tv);
|
||||
CPPUNIT_ASSERT ( ! mouse.isDblclickTimeout(&tv) );
|
||||
|
||||
tv.tv_sec--; // Minus one second
|
||||
CPPUNIT_ASSERT ( mouse.isDblclickTimeout(&tv) );
|
||||
|
||||
mouse.setDblclickInterval(1000000);
|
||||
FObject::getCurrentTime(&tv);
|
||||
CPPUNIT_ASSERT ( ! mouse.isDblclickTimeout(&tv) );
|
||||
|
||||
timeval tv_delta = { 0, 500000 };
|
||||
tv = tv - tv_delta;
|
||||
CPPUNIT_ASSERT ( ! mouse.isDblclickTimeout(&tv) );
|
||||
tv = tv - tv_delta;
|
||||
CPPUNIT_ASSERT ( mouse.isDblclickTimeout(&tv) );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FMouseTest::workspaceSizeTest()
|
||||
{
|
||||
FMouse_protected mouse;
|
||||
CPPUNIT_ASSERT ( mouse.getMaxWidth() == 80 );
|
||||
CPPUNIT_ASSERT ( mouse.getMaxHeight() == 25 );
|
||||
|
||||
mouse.setMaxWidth(92);
|
||||
mouse.setMaxHeight(30);
|
||||
CPPUNIT_ASSERT ( mouse.getMaxWidth() == 92 );
|
||||
CPPUNIT_ASSERT ( mouse.getMaxHeight() == 30 );
|
||||
}
|
||||
|
||||
|
||||
// Put the test suite in the registry
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION (FMouseTest);
|
||||
|
||||
// The general unit test main part
|
||||
#include <main-test.inc>
|
|
@ -0,0 +1,228 @@
|
|||
#! /bin/bash
|
||||
|
||||
# fmouse_test - temporary wrapper script for .libs/fmouse_test
|
||||
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
|
||||
#
|
||||
# The fmouse_test program cannot be directly executed until all the libtool
|
||||
# libraries that it depends on are installed.
|
||||
#
|
||||
# This wrapper script should never be moved out of the build directory.
|
||||
# If it is, it will not operate correctly.
|
||||
|
||||
# Sed substitution that helps us do robust quoting. It backslashifies
|
||||
# metacharacters that are still active within double-quoted strings.
|
||||
sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
|
||||
|
||||
# Be Bourne compatible
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
|
||||
# is contrary to our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
setopt NO_GLOB_SUBST
|
||||
else
|
||||
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
|
||||
fi
|
||||
BIN_SH=xpg4; export BIN_SH # for Tru64
|
||||
DUALCASE=1; export DUALCASE # for MKS sh
|
||||
|
||||
# The HP-UX ksh and POSIX shell print the target directory to stdout
|
||||
# if CDPATH is set.
|
||||
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
||||
|
||||
relink_command="(cd /usr/local/src/guru/finalcut/src/test; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=.:/home/guru/bin:/opt/trinity/bin:/sbin:/usr/sbin/:/home/guru/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games; export PATH; g++ -g -O0 -DDEBUG -o \$progdir/\$file fmouse-test.o -L../../src/.libs /usr/local/src/guru/finalcut/src/.libs/libfinal.so -L/usr/lib/x86_64-linux-gnu -lcppunit -ldl -ltermcap -lgpm -Wl,-rpath -Wl,/usr/local/src/guru/finalcut/src/.libs)"
|
||||
|
||||
# This environment variable determines our operation mode.
|
||||
if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
|
||||
# install mode needs the following variables:
|
||||
generated_by_libtool_version='2.4.2'
|
||||
notinst_deplibs=' /usr/local/src/guru/finalcut/src/.libs/libfinal.la'
|
||||
else
|
||||
# When we are sourced in execute mode, $file and $ECHO are already set.
|
||||
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
|
||||
file="$0"
|
||||
|
||||
# A function that is used when there is no print builtin or printf.
|
||||
func_fallback_echo ()
|
||||
{
|
||||
eval 'cat <<_LTECHO_EOF
|
||||
$1
|
||||
_LTECHO_EOF'
|
||||
}
|
||||
ECHO="printf %s\\n"
|
||||
fi
|
||||
|
||||
# Very basic option parsing. These options are (a) specific to
|
||||
# the libtool wrapper, (b) are identical between the wrapper
|
||||
# /script/ and the wrapper /executable/ which is used only on
|
||||
# windows platforms, and (c) all begin with the string --lt-
|
||||
# (application programs are unlikely to have options which match
|
||||
# this pattern).
|
||||
#
|
||||
# There are only two supported options: --lt-debug and
|
||||
# --lt-dump-script. There is, deliberately, no --lt-help.
|
||||
#
|
||||
# The first argument to this parsing function should be the
|
||||
# script's ../../libtool value, followed by no.
|
||||
lt_option_debug=
|
||||
func_parse_lt_options ()
|
||||
{
|
||||
lt_script_arg0=$0
|
||||
shift
|
||||
for lt_opt
|
||||
do
|
||||
case "$lt_opt" in
|
||||
--lt-debug) lt_option_debug=1 ;;
|
||||
--lt-dump-script)
|
||||
lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'`
|
||||
test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=.
|
||||
lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'`
|
||||
cat "$lt_dump_D/$lt_dump_F"
|
||||
exit 0
|
||||
;;
|
||||
--lt-*)
|
||||
$ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Print the debug banner immediately:
|
||||
if test -n "$lt_option_debug"; then
|
||||
echo "fmouse_test:fmouse_test:${LINENO}: libtool wrapper (GNU libtool) 2.4.2 Debian-2.4.2-1.11" 1>&2
|
||||
fi
|
||||
}
|
||||
|
||||
# Used when --lt-debug. Prints its arguments to stdout
|
||||
# (redirection is the responsibility of the caller)
|
||||
func_lt_dump_args ()
|
||||
{
|
||||
lt_dump_args_N=1;
|
||||
for lt_arg
|
||||
do
|
||||
$ECHO "fmouse_test:fmouse_test:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg"
|
||||
lt_dump_args_N=`expr $lt_dump_args_N + 1`
|
||||
done
|
||||
}
|
||||
|
||||
# Core function for launching the target application
|
||||
func_exec_program_core ()
|
||||
{
|
||||
|
||||
if test -n "$lt_option_debug"; then
|
||||
$ECHO "fmouse_test:fmouse_test:${LINENO}: newargv[0]: $progdir/$program" 1>&2
|
||||
func_lt_dump_args ${1+"$@"} 1>&2
|
||||
fi
|
||||
exec "$progdir/$program" ${1+"$@"}
|
||||
|
||||
$ECHO "$0: cannot exec $program $*" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
# A function to encapsulate launching the target application
|
||||
# Strips options in the --lt-* namespace from $@ and
|
||||
# launches target application with the remaining arguments.
|
||||
func_exec_program ()
|
||||
{
|
||||
case " $* " in
|
||||
*\ --lt-*)
|
||||
for lt_wr_arg
|
||||
do
|
||||
case $lt_wr_arg in
|
||||
--lt-*) ;;
|
||||
*) set x "$@" "$lt_wr_arg"; shift;;
|
||||
esac
|
||||
shift
|
||||
done ;;
|
||||
esac
|
||||
func_exec_program_core ${1+"$@"}
|
||||
}
|
||||
|
||||
# Parse options
|
||||
func_parse_lt_options "$0" ${1+"$@"}
|
||||
|
||||
# Find the directory that this script lives in.
|
||||
thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'`
|
||||
test "x$thisdir" = "x$file" && thisdir=.
|
||||
|
||||
# Follow symbolic links until we get to the real thisdir.
|
||||
file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
|
||||
while test -n "$file"; do
|
||||
destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'`
|
||||
|
||||
# If there was a directory component, then change thisdir.
|
||||
if test "x$destdir" != "x$file"; then
|
||||
case "$destdir" in
|
||||
[\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
|
||||
*) thisdir="$thisdir/$destdir" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
file=`$ECHO "$file" | /bin/sed 's%^.*/%%'`
|
||||
file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
|
||||
done
|
||||
|
||||
# Usually 'no', except on cygwin/mingw when embedded into
|
||||
# the cwrapper.
|
||||
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
|
||||
if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
|
||||
# special case for '.'
|
||||
if test "$thisdir" = "."; then
|
||||
thisdir=`pwd`
|
||||
fi
|
||||
# remove .libs from thisdir
|
||||
case "$thisdir" in
|
||||
*[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;;
|
||||
.libs ) thisdir=. ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Try to get the absolute directory name.
|
||||
absdir=`cd "$thisdir" && pwd`
|
||||
test -n "$absdir" && thisdir="$absdir"
|
||||
|
||||
program=lt-'fmouse_test'
|
||||
progdir="$thisdir/.libs"
|
||||
|
||||
if test ! -f "$progdir/$program" ||
|
||||
{ file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
|
||||
test "X$file" != "X$progdir/$program"; }; then
|
||||
|
||||
file="$$-$program"
|
||||
|
||||
if test ! -d "$progdir"; then
|
||||
mkdir "$progdir"
|
||||
else
|
||||
rm -f "$progdir/$file"
|
||||
fi
|
||||
|
||||
# relink executable if necessary
|
||||
if test -n "$relink_command"; then
|
||||
if relink_command_output=`eval $relink_command 2>&1`; then :
|
||||
else
|
||||
printf %s\n "$relink_command_output" >&2
|
||||
rm -f "$progdir/$file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
|
||||
{ rm -f "$progdir/$program";
|
||||
mv -f "$progdir/$file" "$progdir/$program"; }
|
||||
rm -f "$progdir/$file"
|
||||
fi
|
||||
|
||||
if test -f "$progdir/$program"; then
|
||||
if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
|
||||
# Run the actual program with our arguments.
|
||||
func_exec_program ${1+"$@"}
|
||||
fi
|
||||
else
|
||||
# The program doesn't exist.
|
||||
$ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2
|
||||
$ECHO "This script is just a wrapper for $program." 1>&2
|
||||
$ECHO "See the libtool documentation for more information." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
|
@ -69,7 +69,7 @@ class FObjectTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
protected:
|
||||
void classNameTest();
|
||||
void NoArgumentTest();
|
||||
void noArgumentTest();
|
||||
void childObjectTest();
|
||||
void removeParentTest();
|
||||
void addTest();
|
||||
|
@ -84,7 +84,7 @@ class FObjectTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
// Add a methods to the test suite
|
||||
CPPUNIT_TEST (classNameTest);
|
||||
CPPUNIT_TEST (NoArgumentTest);
|
||||
CPPUNIT_TEST (noArgumentTest);
|
||||
CPPUNIT_TEST (childObjectTest);
|
||||
CPPUNIT_TEST (removeParentTest);
|
||||
CPPUNIT_TEST (addTest);
|
||||
|
@ -107,7 +107,7 @@ void FObjectTest::classNameTest()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FObjectTest::NoArgumentTest()
|
||||
void FObjectTest::noArgumentTest()
|
||||
{
|
||||
FObject o1;
|
||||
CPPUNIT_ASSERT ( ! o1.hasParent() );
|
||||
|
@ -366,7 +366,6 @@ void FObjectTest::timerTest()
|
|||
CPPUNIT_ASSERT ( ! t1.delTimer (id1) ); // id double delete
|
||||
CPPUNIT_ASSERT ( ! t1.delAllTimer() );
|
||||
|
||||
|
||||
t1.addTimer(250);
|
||||
t1.addTimer(500);
|
||||
t2.addTimer(750);
|
||||
|
|
|
@ -45,7 +45,7 @@ class FPointTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
protected:
|
||||
void classNameTest();
|
||||
void NoArgumentTest();
|
||||
void noArgumentTest();
|
||||
void copyConstructorTest();
|
||||
void assignmentTest();
|
||||
void additionAssignmentTest();
|
||||
|
@ -62,7 +62,7 @@ class FPointTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
// Add a methods to the test suite
|
||||
CPPUNIT_TEST (classNameTest);
|
||||
CPPUNIT_TEST (NoArgumentTest);
|
||||
CPPUNIT_TEST (noArgumentTest);
|
||||
CPPUNIT_TEST (copyConstructorTest);
|
||||
CPPUNIT_TEST (assignmentTest);
|
||||
CPPUNIT_TEST (additionAssignmentTest);
|
||||
|
@ -87,7 +87,7 @@ void FPointTest::classNameTest()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FPointTest::NoArgumentTest()
|
||||
void FPointTest::noArgumentTest()
|
||||
{
|
||||
const FPoint point;
|
||||
CPPUNIT_ASSERT ( point.getX() == 0 );
|
||||
|
|
|
@ -45,7 +45,7 @@ class FRectTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
protected:
|
||||
void classNameTest();
|
||||
void NoArgumentTest();
|
||||
void noArgumentTest();
|
||||
void copyConstructorTest();
|
||||
void assignmentTest();
|
||||
void equalTest();
|
||||
|
@ -65,7 +65,7 @@ class FRectTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
// Add a methods to the test suite
|
||||
CPPUNIT_TEST (classNameTest);
|
||||
CPPUNIT_TEST (NoArgumentTest);
|
||||
CPPUNIT_TEST (noArgumentTest);
|
||||
CPPUNIT_TEST (copyConstructorTest);
|
||||
CPPUNIT_TEST (assignmentTest);
|
||||
CPPUNIT_TEST (equalTest);
|
||||
|
@ -93,7 +93,7 @@ void FRectTest::classNameTest()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FRectTest::NoArgumentTest()
|
||||
void FRectTest::noArgumentTest()
|
||||
{
|
||||
const FRect rectangle;
|
||||
CPPUNIT_ASSERT ( rectangle.getX1() == 0 );
|
||||
|
|
|
@ -59,7 +59,7 @@ class FStringTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
protected:
|
||||
void classNameTest();
|
||||
void NoArgumentTest();
|
||||
void noArgumentTest();
|
||||
void initLengthTest();
|
||||
void copyConstructorTest();
|
||||
void assignmentTest();
|
||||
|
@ -98,7 +98,7 @@ class FStringTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
// Add a methods to the test suite
|
||||
CPPUNIT_TEST (classNameTest);
|
||||
CPPUNIT_TEST (NoArgumentTest);
|
||||
CPPUNIT_TEST (noArgumentTest);
|
||||
CPPUNIT_TEST (initLengthTest);
|
||||
CPPUNIT_TEST (copyConstructorTest);
|
||||
CPPUNIT_TEST (assignmentTest);
|
||||
|
@ -156,7 +156,7 @@ void FStringTest::classNameTest()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FStringTest::NoArgumentTest()
|
||||
void FStringTest::noArgumentTest()
|
||||
{
|
||||
FString empty;
|
||||
CPPUNIT_ASSERT ( empty.isNull() );
|
||||
|
|
Loading…
Reference in New Issue