Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Commit [71ade1] Maximize Restore History

Merge branch 'kde4-port'

Conflicts:
INSTALL
admin/cvs.sh
configure.in.in
icons/pics/Makefile.am
ktechlab.kdevelop
src/Makefile.am
src/canvas.cpp
src/canvas.h
src/canvas_private.h
src/canvasitemparts.cpp
src/canvasitemparts.h
src/canvasmanipulator.cpp
src/canvasmanipulator.h
src/cells.cpp
src/cells.h
src/ciwidgetmgr.cpp
src/cnitem.cpp
src/cnitem.h
src/cnitemgroup.cpp
src/cnitemgroup.h
src/connector.cpp
src/connector.h
src/conrouter.cpp
src/conrouter.h
src/contexthelp/Makefile.am
src/core/main.cpp
src/docmanager.cpp
src/document.cpp
src/document.h
src/documentiface.h
src/electronics/Makefile.am
src/electronics/circuiticndocument.cpp
src/electronics/circuitview.h
src/electronics/component.cpp
src/electronics/component.h
src/electronics/components/Makefile.am
src/electronics/components/addac.h
src/electronics/components/bidirled.cpp
src/electronics/components/binarycounter.cpp
src/electronics/components/capacitor.cpp
src/electronics/components/demultiplexer.cpp
src/electronics/components/dependentsource.cpp
src/electronics/components/dependentsource.h
src/electronics/components/discretelogic.cpp
src/electronics/components/discretelogic.h
src/electronics/components/ec555.cpp
src/electronics/components/ecbcdto7segment.cpp
src/electronics/components/ecbjt.cpp
src/electronics/components/ecclockinput.cpp
src/electronics/components/ecfixedvoltage.cpp
src/electronics/components/ecground.cpp
src/electronics/components/ecjfet.cpp
src/electronics/components/eckeypad.cpp
src/electronics/components/ecmosfet.cpp
src/electronics/components/ecsevensegment.cpp
src/electronics/components/ecsubcircuit.cpp
src/electronics/components/ecvoltagesource.cpp
src/electronics/components/flipflop.cpp
src/electronics/components/flipflop.h
src/electronics/components/inductor.cpp
src/electronics/components/led.cpp
src/electronics/components/ledbargraphdisplay.cpp
src/electronics/components/ledbargraphdisplay.h
src/electronics/components/magnitudecomparator.cpp
src/electronics/components/matrixdisplay.cpp
src/electronics/components/matrixdisplay.h
src/electronics/components/matrixdisplaydriver.cpp
src/electronics/components/multiinputgate.cpp
src/electronics/components/multiinputgate.h
src/electronics/components/multiplexer.cpp
src/electronics/components/parallelportcomponent.cpp
src/electronics/components/piccomponent.cpp
src/electronics/components/piccomponent.h
src/electronics/components/piccomponentpin.cpp
src/electronics/components/piccomponentpin.h
src/electronics/components/probe.cpp
src/electronics/components/probe.h
src/electronics/components/ram.cpp
src/electronics/components/ram.h
src/electronics/components/resistor.cpp
src/electronics/components/resistordip.cpp
src/electronics/components/rotoswitch.cpp
src/electronics/components/rotoswitch.h
src/electronics/components/serialportcomponent.cpp
src/electronics/components/serialportcomponent.h
src/electronics/components/variablecapacitor.cpp
src/electronics/components/variableresistor.cpp
src/electronics/pin.cpp
src/electronics/pin.h
src/electronics/simulation/Makefile.am
src/electronics/simulation/bjt.h
src/electronics/simulation/circuit.cpp
src/electronics/simulation/circuit.h
src/electronics/simulation/diode.cpp
src/electronics/simulation/elementset.cpp
src/electronics/simulation/jfet.cpp
src/electronics/simulation/jfet.h
src/electronics/simulation/logic.cpp
src/electronics/simulation/logic.h
src/electronics/simulation/mosfet.cpp
src/electronics/simulation/mosfet.h
src/electronics/simulation/nonlinear.cpp
src/electronics/simulation/nonlinear.h
src/electronics/switch.cpp
src/electronics/switch.h
src/electronics/wire.cpp
src/electronics/wire.h
src/flowcodedocument.h
src/flowcontainer.cpp
src/flowparts/Makefile.am
src/flowparts/flowcodedocument.h
src/flowparts/flowpart.cpp
src/flowparts/fpnode.h
src/flowparts/junctionflownode.cpp
src/flowparts/pinmapping.cpp
src/flowparts/pinmapping.h
src/gui/oscilloscopeview.cpp
src/icndocument.cpp
src/icndocument.h
src/icnview.cpp
src/item.cpp
src/item.h
src/itemdocument.cpp
src/itemdocument.h
src/itemdocumentdata.cpp
src/itemdocumentdata.h
src/itemgroup.cpp
src/itemgroup.h
src/iteminterface.h
src/itemlibrary.cpp
src/itemlibrary.h
src/itemview.cpp
src/katemdi.h
src/ktechlab.cpp
src/ktechlab.h
src/libraryitem.h
src/math/Makefile.am
src/math/matrix.cpp
src/math/matrix.h
src/math/qmatrix.h
src/math/qvector.h
src/node.cpp
src/node.h
src/nodegroup.cpp
src/nodegroup.h
src/oscilloscopedata.h
src/picitem.cpp
src/picitem.h
src/plugins/flowcode/flowparts/flowcodedocument.h
src/simulator.cpp
src/simulator.h
src/textview.cpp
subdirs

Julian Bäume Julian Bäume 2010-08-15

<< < 1 .. 41 42 43 (Page 43 of 43)
added tests/data/test-project/test.circuit
added tests/data/test-project/test.flowcode
added tests/ktlproject/CMakeLists.txt
added tests/ktlproject/ktlprojecttest.cpp
added tests/math/mathtest.cpp
added tests/CMakeLists.txt
added CMakeLists.txt
added config.h.cmake
removed Makefile.am
removed configure.files
changed AUTHORS
changed Doxyfile
changed INSTALL
copied Makefile.cvs -> tests/math/CMakeLists.txt
copied configure.in.in -> tests/ktlproject/ktlprojecttest.h
copied ktechlab.kdevelop -> tests/math/matrixtester.cpp
copied stamp-h.in -> tests/data/test-project/test.microbe
copied subdirs -> .gitignore
tests/data/test-project/test.circuit Diff Switch to side-by-side view
Loading...
tests/data/test-project/test.flowcode Diff Switch to side-by-side view
Loading...
tests/ktlproject/CMakeLists.txt Diff Switch to side-by-side view
Loading...
tests/ktlproject/ktlprojecttest.cpp Diff Switch to side-by-side view
Loading...
tests/math/mathtest.cpp Diff Switch to side-by-side view
Loading...
tests/CMakeLists.txt Diff Switch to side-by-side view
Loading...
CMakeLists.txt Diff Switch to side-by-side view
Loading...
config.h.cmake Diff Switch to side-by-side view
Loading...
Makefile.am
File was removed.
configure.files
File was removed.
AUTHORS Diff Switch to side-by-side view
Loading...
Doxyfile Diff Switch to side-by-side view
Loading...
INSTALL Diff Switch to side-by-side view
Loading...
Makefile.cvs to tests/math/CMakeLists.txt
--- a/Makefile.cvs
+++ b/tests/math/CMakeLists.txt
@@ -1,10 +1,19 @@
-all: 
-	@echo "This Makefile is only for the CVS repository"
-	@echo "This will be deleted before making the distribution"
-	@echo ""
-	$(MAKE) -f admin/Makefile.common cvs
+find_package( Eigen2 )
 
-dist:
-	$(MAKE) -f admin/Makefile.common dist
+if( EIGEN2_FOUND )
+   include_directories(
+      ${CMAKE_SOURCE_DIR}/src/math/
+      ${EIGEN2_INCLUDE_DIR}
+   )
 
-.SILENT:
+   set( mathtest_SRCS
+      matrixtester.cpp
+   )
+   kde4_add_unit_test( mathtest TESTNAME mathtest ${mathtest_SRCS} )
+
+   target_link_libraries( mathtest
+	ktlmath
+	${QT_QTTEST_LIBRARY}
+)
+endif( EIGEN2_FOUND )
+
configure.in.in to tests/ktlproject/ktlprojecttest.h
--- a/configure.in.in
+++ b/tests/ktlproject/ktlprojecttest.h
@@ -1,142 +1,59 @@
-#MIN_CONFIG(3.2.0)
+/*
+    Test handling of KTechLab projects
+    Copyright (C) 2010 Julian B채ume <julian@svg4all.de>
 
-AM_INIT_AUTOMAKE(ktechlab, 0.4.0)
-AC_C_BIGENDIAN
-AC_CHECK_KDEMAXPATHLEN
+    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.
 
-################################
-## BEGIN Check for gpsim 0.21 ##
-################################
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-ktechlab_save_CXXFLAGS="$CXXFLAGS"
+*/
 
-AC_ARG_WITH(glib12, [  --with-glib12           force using glib 1.2.x [default=no]])
-if test "x$with_glib12" != "xyes" ; then
-	glib_cflags=`pkg-config --cflags glib-2.0`
-else
-	glib_cflags=`glib-config --cflags`
-fi
-AC_SUBST(glib_cflags)
+#ifndef KTLPROJECTTEST_H
+#define KTLPROJECTTEST_H
 
-CXXFLAGS="$glib_cflags"
+#include <QtCore/QObject>
 
-AC_MSG_CHECKING([for gpsim 0.21.4 availability])
-AC_TRY_COMPILE(
-	[
-#include <gpsim/interface.h>
-#include <gpsim/gpsim_interface.h>
-#include <gpsim/breakpoints.h>
-#include <gpsim/gpsim_time.h>
-void func() { (void)cycles; (void)initialize_gpsim_core(); (void)load_symbol_file(0,0); exit_gpsim(0); }
-	],
-	[],
-	AC_MSG_RESULT( yes )
-	have_gpsim_0_21_4=yes,
-	AC_MSG_RESULT( no )
-)
+namespace KDevelop
+{
+    class TestCore;
+    class IProject;
+    class ProjectFolderItem;
+    class ProjectFileItem;
+}
 
-AC_MSG_CHECKING([for gpsim 0.21.11 availability])
-AC_TRY_COMPILE(
-	[
-#include <gpsim/interface.h>
-#include <gpsim/gpsim_interface.h>
-#include <gpsim/breakpoints.h>
-#include <gpsim/gpsim_time.h>
-#include <gpsim/symbol.h>
-#include <gpsim/program_files.h>
-void func() { (void)cycles; (void)initialize_gpsim_core(); exit_gpsim(0); }
-	],
-	[],
-	AC_MSG_RESULT( yes )
-	have_gpsim_0_21_11=yes,
-	AC_MSG_RESULT( no )
-)
+namespace KTechLab
+{
 
-AC_MSG_CHECKING([for gpsim 0.21.12 availability])
-AC_TRY_COMPILE(
-	[
-#include <gpsim/ValueCollections.h>
-	],
-	[],
-	AC_MSG_RESULT( yes )
-	have_gpsim_0_21_12=yes,
-	AC_MSG_RESULT( no )
-)
+class KTLProjectTest : public QObject
+{
+Q_OBJECT
 
-CXXFLAGS="$ktechlab_save_CXXFLAGS"
-AC_LANG_RESTORE
+private slots:
+    void initTestCase();
+    void loadKTLProject();
+    void addSubProject();
+    void renameSubProject();
+    void removeSubProject();
+    void addFile();
+    void renameFile();
+    void removeFile();
+    void cleanupTestCase();
 
-##############################
-## END Check for gpsim 0.21 ##
-##############################
-
-
-
-################################
-## BEGIN DO_NOT_COMPILE CHECK ##
-################################
-
-if test x$have_gpsim_0_21_12 == xyes; then
-	AC_DEFINE([GPSIM_0_21_12],[],[Gpsim 0.21.12 was found])
-	CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"
-else
-	if test x$have_gpsim_0_21_4 != xyes; then
-		if test x$have_gpsim_0_21_11 != xyes; then
-			AC_DEFINE([NO_GPSIM],[],[Gpsim was not found])
-			LIB_GPSIM=""
-		else
-			AC_DEFINE([GPSIM_0_21_11],[],[Gpsim 0.21.11 was found])
-		fi
-	else
-		AC_DEFINE([GPSIM_0_21_4],[],[Gpsim 0.21.4 was found])
-	fi
-fi
-
-if test x$have_gpsim_0_21_4 == xyes || test x$have_gpsim_0_21_11 == xyes || test x$have_gpsim_0_21_12 == xyes; then
-	wi_cv_lib_readline=no
-	ac_save_LIBS="$LIBS"
-	# Note: $LIBCURSES is permitted to be empty.
-	for LIBREADLINE in "-lreadline" "-lreadline $LIBCURSES" "-lreadline -ltermcap" "-lreadline -lncurses" "-lreadline -lcurses"
-	do
-		LIBS="$ac_save_LIBS $LIBREADLINE"
-		LIB_GPSIM="$LIBREADLINE -lgpsim -lgpsim_eXdbm "
-		AC_TRY_RUN([
-			/* program */
-			#include <stdio.h>
-			#include <stdlib.h>
-		 
-			main(int argc, char **argv)
-			{
-				/* Note:  don't actually call readline, since it may block;
-				 * We just want to see if it (dynamic) linked in okay.
-				 */
-				if (argc == 0)	/* never true */
-					readline(0);
-				exit(0);
-			}
-		],[
-		# action if true
-			wi_cv_lib_readline=yes
-		],[
-			# action if false
-			wi_cv_lib_readline=no
-	],[
-		# action if cross compiling
-		wi_cv_lib_readline=no
-	])
-	
-		if test "$wi_cv_lib_readline" = yes ; then break ; fi
-	done
-
-	LIBS="$ac_save_LIBS"
-fi
-
-AC_SUBST(LIB_GPSIM)
-
-##############################
-## END DO_NOT_COMPILE CHECK ##
-##############################
-
+private:
+    KDevelop::TestCore* m_core;
+    KDevelop::IProject* m_project;
+    KDevelop::ProjectFolderItem* m_testFolderItem;
+    KDevelop::ProjectFileItem* m_testFileItem;
+};
+}
+#endif // KTLPROJECTTEST_H
ktechlab.kdevelop to tests/math/matrixtester.cpp
--- a/ktechlab.kdevelop
+++ b/tests/math/matrixtester.cpp
@@ -1,329 +1,389 @@
-<?xml version = '1.0'?>
-<kdevelop>
-  <general>
-    <author>David Saxton, Alan Grimes</author>
-    <email>agrimes@speakeasy.net</email>
-    <version>0.3.7</version>
-    <projectmanagement>KDevKDEAutoProject</projectmanagement>
-    <primarylanguage>C++</primarylanguage>
-    <keywords>
-      <keyword>C++</keyword>
-      <keyword>Code</keyword>
-      <keyword>Qt</keyword>
-      <keyword>KDE</keyword>
-    </keywords>
-    <projectdirectory>.</projectdirectory>
-    <absoluteprojectpath>false</absoluteprojectpath>
-    <description></description>
-    <ignoreparts>
-      <part>kdevbookmarks</part>
-      <part>kdevctags2</part>
-      <part>kdevsnippet</part>
-      <part>kdevfileview</part>
-      <part>kdevfilelist</part>
-      <part>kdevquickopen</part>
-      <part>kdevfilter</part>
-      <part>kdevtools</part>
-    </ignoreparts>
-    <secondaryLanguages/>
-    <versioncontrol>kdevsubversion</versioncontrol>
-    <projectname>ktechlab</projectname>
-    <defaultencoding></defaultencoding>
-  </general>
-  <kdevautoproject>
-    <general>
-      <useconfiguration>debug</useconfiguration>
-      <activetarget>src/ktechlab</activetarget>
-    </general>
-    <run>
-      <mainprogram/>
-      <terminal>false</terminal>
-      <directoryradio>executable</directoryradio>
-      <customdirectory>/</customdirectory>
-      <programargs/>
-      <autocompile>true</autocompile>
-      <envvars/>
-      <runarguments>
-        <ktechlab/>
-        <microbasic/>
-        <utest/>
-        <mathtest/>
-      </runarguments>
-      <globaldebugarguments/>
-      <globalcwd/>
-      <useglobalprogram>false</useglobalprogram>
-      <autoinstall>false</autoinstall>
-      <autokdesu>false</autokdesu>
-      <debugarguments>
-        <ktechlab/>
-        <utest/>
-        <mathtest/>
-      </debugarguments>
-      <cwd>
-        <ktechlab>debug/./src</ktechlab>
-        <utest>/home/atg/source/ktechlab-svn/ktechlab/trunk/debug/./src</utest>
-        <mathtest>/home/atg/source/ktechlab/trunk/debug/./src</mathtest>
-      </cwd>
-    </run>
-    <make>
-      <envvars/>
-      <abortonerror>true</abortonerror>
-      <numberofjobs>3</numberofjobs>
-      <dontact>false</dontact>
-      <makebin/>
-      <prio>0</prio>
-      <runmultiplejobs>true</runmultiplejobs>
-    </make>
-    <configurations>
-      <optimized>
-        <builddir>optimized</builddir>
-        <ccompiler>kdevgccoptions</ccompiler>
-        <cxxcompiler>kdevgppoptions</cxxcompiler>
-        <f77compiler>kdevpgf77options</f77compiler>
-        <cxxflags>-O3 -g0</cxxflags>
-        <configargs>--prefix=/usr  --enable-pch=yes</configargs>
-        <topsourcedir/>
-        <cppflags/>
-        <ldflags>-lkmdi -lktexteditor</ldflags>
-        <ccompilerbinary/>
-        <cxxcompilerbinary/>
-        <f77compilerbinary/>
-        <cflags/>
-        <f77flags/>
-        <envvars/>
-      </optimized>
-      <debug>
-        <configargs>--enable-debug=full --enable-pch=yes --without-arts</configargs>
-        <builddir>debug</builddir>
-        <ccompiler>kdevgccoptions</ccompiler>
-        <cxxcompiler>kdevgppoptions</cxxcompiler>
-        <f77compiler>kdevpgf77options</f77compiler>
-        <cxxflags>-O0 -ggdb -pedantic</cxxflags>
-        <topsourcedir></topsourcedir>
-        <cppflags></cppflags>
-        <ldflags></ldflags>
-        <ccompilerbinary></ccompilerbinary>
-        <cxxcompilerbinary></cxxcompilerbinary>
-        <f77compilerbinary></f77compilerbinary>
-        <cflags>-Werror -pedantic-errors -ggdb</cflags>
-        <f77flags></f77flags>
-        <envvars/>
-      </debug>
-      <default>
-        <configargs>--prefix=/usr  --enable-final</configargs>
-        <builddir/>
-        <topsourcedir/>
-        <cppflags/>
-        <ldflags>-lkmdi -lktexteditor</ldflags>
-        <ccompiler>kdevgccoptions</ccompiler>
-        <cxxcompiler>kdevgppoptions</cxxcompiler>
-        <f77compiler>kdevpgf77options</f77compiler>
-        <ccompilerbinary/>
-        <cxxcompilerbinary/>
-        <f77compilerbinary/>
-        <cflags/>
-        <cxxflags/>
-        <f77flags/>
-        <envvars/>
-      </default>
-    </configurations>
-  </kdevautoproject>
-  <kdevfileview>
-    <groups>
-      <group pattern="src/drawparts/*.cpp;src/drawparts/*.h" name="DrawParts" />
-      <group pattern="src/languages/*.cpp;src/languages/*.h" name="Languages" />
-      <group pattern="src/gui/itemeditor/*.cpp;src/gui/itemeditor/*.h" name="Gui/Item Editor" />
-      <group pattern="src/gui/*.cpp;src/gui/*.h;src/gui/*.ui" name="Gui" />
-      <group pattern="src/electronics/components/*.cpp;src/electronics/components/*.h" name="Electronics/Components" />
-      <group pattern="src/electronics/simulation/*.cpp;src/electronics/simulation/*.h" name="Electronics/Simulation" />
-      <group pattern="src/electronics/*.cpp;src/electronics/*.h" name="Electronics" />
-      <group pattern="microbe/*.cpp;microbe/*.h" name="Microbe" />
-      <group pattern="src/micro/*.cpp;src/micro/*.h" name="Micro" />
-      <group pattern="src/mechanics/*.cpp;src/mechanics/*.h" name="Mechanics" />
-      <group pattern="src/flowparts/*.cpp;src/flowparts/*.h" name="FlowParts" />
-      <group pattern="src/*.cpp;src/*.h" name="Sources" />
-      <group pattern="*.png" name="Icons" />
-      <group pattern="*.po;*.ts" name="Translations" />
-      <group pattern="examples/*" name="Examples" />
-      <group pattern="*" name="Others" />
-      <hidenonprojectfiles>true</hidenonprojectfiles>
-      <hidenonlocation>true</hidenonlocation>
-    </groups>
-    <tree>
-      <hidenonprojectfiles>false</hidenonprojectfiles>
-      <hidepatterns/>
-      <showvcsfields>true</showvcsfields>
-    </tree>
-  </kdevfileview>
-  <kdevdoctreeview>
-    <ignoretocs>
-      <toc>gtk</toc>
-      <toc>gnustep</toc>
-      <toc>python</toc>
-      <toc>php</toc>
-      <toc>perl</toc>
-    </ignoretocs>
-    <projectdoc>
-      <userdocDir>/home/okuti/testprj/ktechlab/html/</userdocDir>
-      <apidocDir>/home/okuti/testprj/ktechlab/html/</apidocDir>
-    </projectdoc>
-    <ignoreqt_xml/>
-    <ignoredoxygen/>
-    <ignorekdocs/>
-    <ignoredevhelp/>
-  </kdevdoctreeview>
-  <kdevdebugger>
-    <general>
-      <dbgshell></dbgshell>
-      <programargs/>
-      <gdbpath></gdbpath>
-      <breakonloadinglibs>true</breakonloadinglibs>
-      <separatetty>false</separatetty>
-      <floatingtoolbar>false</floatingtoolbar>
-      <runappinappdirectory>true</runappinappdirectory>
-      <configGdbScript></configGdbScript>
-      <runShellScript></runShellScript>
-      <runGdbScript></runGdbScript>
-      <raiseGDBOnStart>false</raiseGDBOnStart>
-    </general>
-    <display>
-      <staticmembers>false</staticmembers>
-      <demanglenames>true</demanglenames>
-      <outputradix>10</outputradix>
-    </display>
-  </kdevdebugger>
-  <kdevfilecreate>
-    <filetypes/>
-    <useglobaltypes>
-      <type ext="ui" />
-      <type ext="cpp" />
-      <type ext="h" />
-    </useglobaltypes>
-  </kdevfilecreate>
-  <kdevcvs>
-    <cvsoptions>-f</cvsoptions>
-    <commitoptions/>
-    <updateoptions>-dP</updateoptions>
-    <addoptions/>
-    <removeoptions>-f</removeoptions>
-    <diffoptions>-u3 -p</diffoptions>
-    <logoptions/>
-    <rshoptions/>
-    <revertoptions>-C -d -P</revertoptions>
-  </kdevcvs>
-  <cppsupportpart>
-    <codecompletion/>
-    <filetemplates>
-      <choosefiles>false</choosefiles>
-      <interfaceURL/>
-      <implementationURL/>
-      <interfacesuffix>.h</interfacesuffix>
-      <implementationsuffix>.cpp</implementationsuffix>
-      <lowercasefilenames>true</lowercasefilenames>
-    </filetemplates>
-  </cppsupportpart>
-  <kdevclassview>
-    <folderhierarchy>true</folderhierarchy>
-    <depthoffolders>2</depthoffolders>
-  </kdevclassview>
-  <kdevcppsupport>
-    <codecompletion>
-      <includeGlobalFunctions>true</includeGlobalFunctions>
-      <includeTypes>true</includeTypes>
-      <includeEnums>true</includeEnums>
-      <includeTypedefs>true</includeTypedefs>
-      <automaticCodeCompletion>true</automaticCodeCompletion>
-      <automaticArgumentsHint>true</automaticArgumentsHint>
-      <automaticHeaderCompletion>true</automaticHeaderCompletion>
-      <codeCompletionDelay>250</codeCompletionDelay>
-      <argumentsHintDelay>400</argumentsHintDelay>
-      <headerCompletionDelay>250</headerCompletionDelay>
-      <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
-      <completionBoxItemOrder>0</completionBoxItemOrder>
-      <howEvaluationContextMenu>true</howEvaluationContextMenu>
-      <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
-      <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
-      <namespaceAliases>std=_GLIBCXX_STD;__gnu_cxx=std</namespaceAliases>
-      <processPrimaryTypes>true</processPrimaryTypes>
-      <processFunctionArguments>false</processFunctionArguments>
-      <preProcessAllHeaders>false</preProcessAllHeaders>
-      <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
-      <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
-      <alwaysParseInBackground>true</alwaysParseInBackground>
-      <usePermanentCaching>true</usePermanentCaching>
-      <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
-      <includePaths>.;</includePaths>
-    </codecompletion>
-    <references/>
-    <creategettersetter>
-      <prefixGet></prefixGet>
-      <prefixSet>set</prefixSet>
-      <prefixVariable>m_,_</prefixVariable>
-      <parameterName>theValue</parameterName>
-      <inlineGet>true</inlineGet>
-      <inlineSet>true</inlineSet>
-    </creategettersetter>
-    <designerintegration>
-      <qtdesigner/>
-    </designerintegration>
-    <qt>
-      <used>true</used>
-      <version>3</version>
-      <root>/usr/qt/3</root>
-      <includestyle>3</includestyle>
-      <designerintegration>EmbeddedKDevDesigner</designerintegration>
-      <qmake>/usr/qt/3/bin/qmake</qmake>
-      <designer>/usr/qt/3/bin/designer</designer>
-      <designerpluginpaths/>
-    </qt>
-    <splitheadersource>
-      <enabled>false</enabled>
-      <synchronize>true</synchronize>
-      <orientation>Vertical</orientation>
-    </splitheadersource>
-  </kdevcppsupport>
-  <kdevdocumentation>
-    <projectdoc>
-      <docsystem/>
-      <docurl/>
-      <usermanualurl/>
-    </projectdoc>
-  </kdevdocumentation>
-  <dist>
-    <custom>false</custom>
-    <bzip>true</bzip>
-    <archname>ktechlab-0.2</archname>
-    <appname>ktechlab</appname>
-    <version>0.3</version>
-    <release/>
-    <vendor/>
-    <licence/>
-    <summary/>
-    <group/>
-    <packager/>
-    <description/>
-    <changelog/>
-    <devpackage>false</devpackage>
-    <docspackage>false</docspackage>
-    <appicon>false</appicon>
-    <arch>0</arch>
-    <genHTML>false</genHTML>
-    <useRPM>false</useRPM>
-    <ftpkde>false</ftpkde>
-    <appskde>false</appskde>
-    <url/>
-  </dist>
-  <ctagspart>
-    <customArguments/>
-    <customTagfilePath/>
-  </ctagspart>
-  <kdevvisualadvance>
-    <emulator>VisualBoyAdvance</emulator>
-    <binary/>
-    <addOptions/>
-    <terminal>false</terminal>
-    <fullscreen>false</fullscreen>
-    <graphicFilter>-f0</graphicFilter>
-    <scaling>-1</scaling>
-  </kdevvisualadvance>
-</kdevelop>
+#include <matrix.h>
+#include <quickmatrix.h>
+#include <quickvector.h>
+
+#include "Eigen/Core"
+#include "Eigen/LU"
+#include "Eigen/Array"
+
+#include <QtTest/QtTest>
+
+// using namespace Eigen;
+
+#define     VERY_SMALL_THRESHOLD    1e-12
+#define     MULTIPLY_ERROR          1e-10
+#define     SOLVE_ERROR             1e-10
+
+#undef LOT_OF_DEBUG
+
+class MatrixTester : public QObject
+{
+    Q_OBJECT
+
+     // create a new vector from eigen one
+     QuickVector * vectorFromEigen(const Eigen::VectorXd & eig){
+        QuickVector *ret = new QuickVector( eig.size() );
+        for(int i=0; i<eig.size(); i++)
+            ret->atPut(i, eig[i]);
+        return ret;
+     }
+ 
+    // create a new matrix from an eigen matrix
+    Matrix * matrixFromEigen(const Eigen::MatrixXd & eig){
+        if( eig.rows() != eig.cols() ){
+            qDebug("Broken testcase! matrix not square!\n");
+            return NULL;
+        }
+ 
+        Matrix *ret = new Matrix(eig.rows()) ;
+        for(int x=0; x<eig.cols(); x++)
+            for(int y=0; y<eig.rows(); y++)
+                ret->g(x,y) = eig(x,y);
+ 
+        // some testing
+        #ifdef LOT_OF_DEBUG
+        std::cout << "original matrix:\n" << eig << "\n";
+        std::cout << "new matrix:\n";
+        ret->displayMatrix(std::cout);
+        std::cout << "\n";
+        #endif
+        return ret;
+    }
+ 
+    // compare 2 matrxies. take the sum of absolute values of diffrences
+    double differenceOfMatrixes(const Eigen::MatrixXd &eig, Matrix &our){
+                    // FIXME can't make "our" constant, as no there is no "get" api 
+        // if( (eig.cols() != our. ??? // TODO no API to get matrxi size!
+        double ret = 0;
+        for(int x = 0; x<eig.cols(); x++)
+            for(int y=0; y<eig.rows(); y++)
+                ret += abs( our.g(x,y) - eig(x,y));
+        return ret;
+    }
+ 
+    // compare an eigen vector to quickvector
+    double differenceOfVectors(const Eigen::VectorXd &eig, const QuickVector &our){
+        if( eig.size() != our.size()){
+            qDebug("test case broken. comparing vectors of different size!");
+            return 1e12;
+        }
+        double ret = 0;
+        for(int x=0; x<our.size(); x++)
+            ret += abs( our.at(x) - eig(x));
+        return ret;
+    }
+ 
+    // create matrix and vector from eigen expression, then perform solving
+    // and check the results
+    void solveTest(Eigen::MatrixXd &em, Eigen::VectorXd &ev){
+        Matrix *pm = matrixFromEigen(em);
+        QVERIFY( pm != 0 );
+        // FIXME can't get the size of our matrix
+        // QVERIFY( pm ?? , em->size() );
+
+        // for debugging this method/function
+        // #define DEBUG_SOLVETEST
+
+        #ifdef DEBUG_SOLVETEST
+        std::cout << "pm = ";
+        pm->displayMatrix(std::cout);
+        std::cout << "\n";
+        #endif
+
+        QuickVector *pv = vectorFromEigen(ev);
+        QVERIFY( pv != 0 );
+        QVERIFY( pv->size() == (unsigned int)ev.size() );
+
+        #ifdef DEBUG_SOLVETEST
+        std::cout << "pv = ";
+        pv->dumpToAux();
+        std::cout << "\n";
+        #endif
+
+        Eigen::LU<Eigen::MatrixXd> eLU(em);
+        pm->performLU();
+
+        // solve
+        Eigen::VectorXd esol( em.cols() );
+        eLU.solve(ev, &esol);
+
+        pm->fbSub(pv);
+
+        #ifdef DEBUG_SOLVETEST
+        std::cout << "pv(solved) = ";
+        pv->dumpToAux();
+        std::cout << "\n";
+        #endif
+
+        double diff = differenceOfVectors(esol, pv);
+        if( diff > SOLVE_ERROR) {
+            qDebug("solving test failed. dumping matrixes:\n");
+            std::cout << "Eigen stuff: \nem, matrix =\n" << em
+                << "\nev other side vector = \n" << ev
+                << "\nesol unknown vector = \n" << esol
+                << "\nCurrent matrixes:\npm matrix = \n";
+            pm->displayMatrix(std::cout);
+            std::cout << "\npv(sol) solution of equation = \n";
+            pv->dumpToAux();
+            //           std::cout << "\ndiff = " << diff << "\n";
+        }
+        QVERIFY(diff < SOLVE_ERROR);
+
+        // multiply back, just for fun
+        QuickVector res( em.rows() );
+        pm->multiply(pv, &res);
+
+        Eigen::VectorXd eres = em * esol;
+        diff = differenceOfVectors(eres, res);
+        if( diff > MULTIPLY_ERROR ) {
+            qDebug("solving test, multiplying the result back failed. \
+                Dumping matrixes");
+            std::cout << "Eigen stuff: \nem, matrix =\n" << em
+                << "\nev other side vector = \n" << ev
+                << "\nesol unknown vector = \n" << esol
+                << "\nCurrent matrixes:\npm matrix = \n";
+            pm->displayMatrix(std::cout);
+            std::cout << "\npv(sol) solution of equation = \n";
+            pv->dumpToAux();
+            //            std::cout << "\ndiff = " << diff << "\n";
+
+        }
+        QVERIFY(diff < MULTIPLY_ERROR);
+
+        delete pm;
+        delete pv;
+    }
+
+private slots:
+ 
+    void initTestCase() { 
+        qDebug("called before everything else"); 
+    }
+
+    void mySecondTest() { 
+        QVERIFY(1 != 2); 
+    }
+
+    void getSetVectorFuzzerTest() {
+        qDebug("starting");
+ 
+        for( int i = 1; i < 10 ; i ++ ){
+            Eigen::VectorXd ref = Eigen::VectorXd::Random(i);
+ 
+        }
+    }
+ 
+    void getSetMatrixFuzzerTest() {
+        qDebug("starting");
+ 
+        for( int i = 1; i < 10 ; i++ ) {
+            Eigen::MatrixXd ref = Eigen::MatrixXd::Random(i,i);
+ 
+            Matrix * tested = matrixFromEigen( ref );
+            QVERIFY( tested != NULL );
+ 
+            double dif =  differenceOfMatrixes( ref, *tested );
+ 
+            if( dif >= VERY_SMALL_THRESHOLD )
+                tested->displayMatrix(std::cerr);
+            QVERIFY( dif < VERY_SMALL_THRESHOLD );
+ 
+            delete tested;
+        }
+     }
+ 
+     void multiplyFuzzerTest() {
+        qDebug("starting");
+ 
+        for( int i = 1; i < 10; i++ ){
+ 
+            // create matrix
+            Eigen::MatrixXd refM = Eigen::MatrixXd::Random(i,i);
+ 
+            Matrix * testedM = matrixFromEigen( refM );
+            QVERIFY( testedM != NULL );
+ 
+            // create vector
+            Eigen::VectorXd refV = Eigen::VectorXd::Random(i);
+            QuickVector * testedV = vectorFromEigen( refV );
+            QVERIFY( testedV != NULL );
+ 
+            // multiply them
+            Eigen::VectorXd refRes = refM * refV;
+ 
+            QuickVector * testedRes = new QuickVector(i);
+            QVERIFY( testedRes != NULL );
+            testedM->multiply( testedV, testedRes );
+ 
+            double multError = differenceOfVectors(refRes, testedRes);
+            if( multError >= MULTIPLY_ERROR ) {
+                std::cout << "multiply error. \nrefV: \n" << refV << 
+                            "\nrefM:\n" << refM << "\nrefRes:\n" << refRes << 
+                            "\ntestedM:\n" << std::endl;
+                testedM->displayMatrix(std::cout);
+                std::cout << "\ntestedV:\n";
+                testedV->dumpToAux();
+                std::cout << "\ntestedRes:\n";
+                testedRes->dumpToAux();
+                std::cout <<"\n";
+ 
+            }
+            QVERIFY( multError < MULTIPLY_ERROR );
+ 
+            delete testedM;
+            delete testedRes;
+        }
+     }
+ 
+    void solveFuzzerTest() {
+        qDebug("starting");
+ 
+        for( int i = 1; i < 10; i++ ){
+ 
+            // create matrix
+            Eigen::MatrixXd refM = Eigen::MatrixXd::Random(i,i);
+ 
+            Matrix * testedM = matrixFromEigen( refM );
+            QVERIFY( testedM != NULL );
+ 
+            // create vector
+ 
+            // perform LU
+            Eigen::LU<Eigen::MatrixXd> refLU(refM);
+            testedM->performLU();
+ 
+            for(int j = 0; j < 5; j++) {
+                // get some vectors
+                Eigen::VectorXd refV = Eigen::VectorXd::Random(i);
+                QuickVector * testedV = vectorFromEigen( refV );
+                QVERIFY( testedV != NULL );
+ 
+                // solve the eq.
+                Eigen::VectorXd refSol(i);
+                refLU.solve(refV, &refSol);
+ 
+                testedM->fbSub(testedV);
+ 
+                //check
+                double diff = differenceOfVectors(refSol, testedV );
+                if( diff >= SOLVE_ERROR){
+                    std::cerr << "LU solve error.\n refV:\n" << refV << std::endl;
+                    std::cerr << "revM:\n" << refM << std::endl;
+                }
+                QVERIFY( diff < SOLVE_ERROR);
+            }
+            delete testedM;
+ 
+       }
+   }
+ 
+   void test1x1_0(){
+        // to make this test verbose
+        // #define TEST1X1_VERBOSE
+
+        Matrix m(1);
+        m.g(0,0) = 1;
+
+        QuickVector v(1);
+        v.atPut(0, 1);
+
+        #ifdef TEST1X1_VERBOSE
+        std::cout <<"v = \n";
+        v.dumpToAux();
+        std::cout << "\n";
+        #endif
+
+        // FIXME the matrix solver doesn't complain if the LU has not been performed since last change
+        m.performLU();
+
+        m.fbSub(&v);
+
+        #ifdef TEST1X1_VERBOSE
+        std::cout << "matirx LU:\n";
+        m.displayLU(std::cout);
+        std::cout << "\nmatrix = \n";
+        m.displayMatrix(std::cout);
+        std::cout << "\nresult = \n";
+        v.dumpToAux();
+        std::cout << "\n";
+        #endif
+
+        QVERIFY( v.at(0) == 1 );
+    }
+
+    void test1x1_1(){
+        Eigen::MatrixXd m(1,1);
+        m << 1 ;
+        Eigen::VectorXd v(1);
+        v << 1;
+        solveTest(m,v);
+    }
+
+    void test2x2_1(){
+        Eigen::MatrixXd t(2,2);
+        t(0,0) = 1;
+        t(0,1) = 0;
+        t(1,0) = 0;
+        t(1,1) = 1;
+
+        Eigen::VectorXd v(2);
+        v(0) = 0;
+        v(1) = 0;
+        solveTest(t, v);
+
+        v(0) = 1;
+        v(1) = 1;
+        solveTest(t, v);
+
+        v(0) = 0;
+        v(1) = 1;
+        solveTest(t, v);
+
+        v(0) = 1;
+        v(1) = 0;
+        solveTest(t, v);
+
+        t(1,0) = 1;
+        solveTest(t, v);
+
+        t(0,0) = 0;
+        t(0,1) = 1;
+        t(1,0) = 1;
+        t(1,1) = 0;
+        solveTest(t, v);
+
+    }
+
+    void testFuzzySparse(){
+        const int maxcol = 7;
+        const int maxrow = 7;
+        Eigen::MatrixXd m(maxrow,maxcol);
+        Eigen::VectorXd v(maxrow);
+        v.setRandom();
+
+        int row, col;
+        srand( time(NULL) );
+        // nonz = number of nonzero elements
+        for(int nonz=1;nonz<10; nonz++){
+            // fill m with nonz nonzero elements
+        m.setZero();
+        for(int i=0; i<nonz; i++){
+            do {
+            row = (int) (5.0*rand()/RAND_MAX);
+            col = (int) (5.0*rand()/RAND_MAX);
+            } while( m(row, col) != 0 );
+            m( row, col) = 1;
+        }
+            // got m, now test
+        solveTest(m, v);
+        }
+    }
+
+    void cleanupTestCase(){ 
+        qDebug("called after myFirstTest and mySecondTest"); 
+    }
+};
+ 
+QTEST_MAIN(MatrixTester)
+#include "matrixtester.moc"
+
subdirs to .gitignore
--- a/subdirs
+++ b/.gitignore
@@ -1,8 +1,9 @@
-admin
-doc
-examples
-icons
-microbe
-po
-src
-testing
+build
+qtcreator-build
+build-doxygen
+*~
+CMakeLists.txt.user
+*.kdev*
+.*.swp
+*.bak
+
<< < 1 .. 41 42 43 (Page 43 of 43)