[Kst] branches/work/kst/portto4/kst

Mike Fenton mike at staikos.net
Tue May 20 16:52:35 CEST 2008


SVN commit 810366 by fenton:

Update tests to compile / pass with tag updates.


 M  +3 -1      src/libkstmath/csd.cpp  
 M  +5 -3      tests/testcsd.cpp  
 M  +2 -2      tests/testpsd.cpp  


--- branches/work/kst/portto4/kst/src/libkstmath/csd.cpp #810365:810366
@@ -204,7 +204,9 @@
   updateMatrixLabels();
   _outMatrix->setDirty();
 
-  connect(_inputVectors[INVECTOR], SIGNAL(vectorUpdated(ObjectPtr)), this, SLOT(inputObjectUpdated(ObjectPtr)));
+  if (in_V) {
+    connect(in_V, SIGNAL(vectorUpdated(ObjectPtr)), this, SLOT(inputObjectUpdated(ObjectPtr)));
+  }
 }
 
 
--- branches/work/kst/portto4/kst/tests/testcsd.cpp #810365:810366
@@ -119,8 +119,9 @@
   }
 
   Kst::CSDPtr csd = new Kst::CSD(&_store, Kst::ObjectTag::fromString("csdTest"), vp, 0.0, false, false, false, WindowUndefined, 0, 0, 0.0, PSDUndefined, QString::null, QString::null);
+
   QCOMPARE(csd->tag().tagString(), QLatin1String("csdTest"));
-  QCOMPARE(csd->vTag(), QLatin1String("tempVector"));
+  QCOMPARE(csd->vector()->tag().tagString(), QLatin1String("tempVector"));
   QCOMPARE(csd->output(), PSDUndefined);
   QVERIFY(!csd->apodize());
   QVERIFY(!csd->removeMean());
@@ -144,7 +145,7 @@
   csd->setGaussianSigma(0.2);
 
   QCOMPARE(csd->tag().tagString(), QLatin1String("csdTest"));
-  QCOMPARE(csd->vTag(), QLatin1String("tempVector"));
+  QCOMPARE(csd->vector()->tag().tagString(), QLatin1String("tempVector"));
   QCOMPARE(csd->output(), PSDAmplitudeSpectralDensity);
   QVERIFY(csd->apodize());
   QVERIFY(csd->removeMean());
@@ -180,7 +181,8 @@
     vp2->value()[i] = i;
   }
   csdDOM->setVector(vp2);
-  QCOMPARE(csdDOM->vTag(), QLatin1String("tempVector2"));
+
+  QCOMPARE(csdDOM->vector()->tag().tagString(), QLatin1String("tempVector2"));
   csdDOM->setWindowSize(9);
   Kst::MatrixPtr outMatrix = csdDOM->outputMatrix();
 
--- branches/work/kst/portto4/kst/tests/testpsd.cpp #810365:810366
@@ -122,7 +122,7 @@
 
   Kst::PSDPtr psd = new Kst::PSD(&_store, Kst::ObjectTag::fromString("psdTest"), vp, 0.0, false, 10, false, false, QString("vUnits"), QString("rUnits"), WindowUndefined, 0.0, PSDUndefined);
   QCOMPARE(psd->tag().tagString(), QLatin1String("psdTest"));
-  QCOMPARE(psd->vTag(), QLatin1String("tempVector"));
+  QCOMPARE(psd->vector()->tag().tagString(), QLatin1String("tempVector"));
   QCOMPARE(psd->output(), PSDUndefined);
   QVERIFY(!psd->apodize());
   QVERIFY(!psd->removeMean());
@@ -155,7 +155,7 @@
   psd->setGaussianSigma(0.2);
 
   QCOMPARE(psd->tag().tagString(), QLatin1String("psdTest"));
-  QCOMPARE(psd->vTag(), QLatin1String("tempVector"));
+  QCOMPARE(psd->vector()->tag().tagString(), QLatin1String("tempVector"));
   QCOMPARE(psd->output(), PSDAmplitudeSpectralDensity);
   QVERIFY(psd->apodize());
   QVERIFY(psd->removeMean());


More information about the Kst mailing list