Browse Source

using exact fractions in tests

tempestpy_adaptions
hannah 3 years ago
committed by Stefan Pranger
parent
commit
133219f3c7
  1. 12
      src/test/storm/modelchecker/csl/CtmcCslModelCheckerTest.cpp

12
src/test/storm/modelchecker/csl/CtmcCslModelCheckerTest.cpp

@ -469,13 +469,13 @@ namespace {
if (TypeParam::engine == CtmcEngine::PrismSparse || TypeParam::engine == CtmcEngine::JaniSparse || TypeParam::engine == CtmcEngine::JitSparse) {
result = checker->check(this->env(), tasks[0]);
EXPECT_NEAR(this->parseNumber("0.93458777106264368"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
EXPECT_NEAR(this->parseNumber("6201111489217/6635130141055"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
result = checker->check(this->env(), tasks[1]);
EXPECT_NEAR(this->parseNumber("0.878104234117144888"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
EXPECT_NEAR(this->parseNumber("182020967567825809324525759316263872210321582568114089975442470616306546970576799368889148054286400140039235238542379833694042687710639406937776190886135408090165698233430649593680647981952463347746024873495777857814386773710331804169990674529100754583695367774161875507044994661278270139591275881461260070117701448841596602041739425021618556458197240253807881255308059191194657575523127649292873946401600705744976789328068766287472574570803652848157332500632820598013756095085890607757713651215707639162546865863133892334758775858116620357147078085971884542677483086820336410289852315689173054718889915988181632722920483222289764504589120520736097022590652379/207288566091424649028720059396722579180935939731896317482437400340085729948319838320744587962528995351116735632610062501984165964160824743820968502984043393631527162621940700372437967239869902745684470791247218025011629936383683180819173695481357872127414459383695458034829702750095798077157671737142972112983783526417917830063407814131534204102733837172200651731758231462705370319722286895248244604663525334713443271108863630608264048954674658939565927125123713502020902415642152134952750797223075762309310186151383660810569853113110736677679624520398243456708277522978182665363672039087497825748539279661186260492946647251487454498033763681938956076478285935"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
result = checker->check(this->env(), tasks[2]);
EXPECT_NEAR(this->parseNumber("0.934587771062649453"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
EXPECT_NEAR(this->parseNumber("6201111489217/6635130141055"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
result = checker->check(this->env(), tasks[3]);
EXPECT_TRUE(this->getQualitativeResultAtInitialState(model, result));
@ -484,7 +484,7 @@ namespace {
EXPECT_TRUE(this->getQualitativeResultAtInitialState(model, result));
result = checker->check(this->env(), tasks[5]);
EXPECT_NEAR(this->parseNumber("0.999979077232484914"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
EXPECT_NEAR(this->parseNumber("1202946881424160483813283754811216158529681407876794488562578158132042553611617599206276810240300260522066002609216899556806782592159369214025808794108439870476812421358247413140536419394633974952856222783873484713998841710951907938016323396243234904692402529616778550274612832580948290476037585840335145980480834541017213112991298412961159070334858462971422527038014973671594536802662479216742910965815165548764799425931464388642414276679044295398781842946801210199279858811082435065176154734735687314482662005774077569191240855183945543277103593833128730289929192543135438680962528094118605758445585995100073617/1202972050928710483231931881297292393407746913324566889646682839175998467151639078036566607429531813783366080734929392920005624456488274509559191073647430577878963431232759904608946782891839010213213206349818700590576273106941528872428420715245020013732520855670532992537989370310710476972890517512421272587449374385206819958406508377778081897385805121026698602418585526601660738490866798063415281360790178552717524631472037313126822801359812861351759990595156696407982588022635797417464794849389306521644962338915119549986021747121828809226061546105390273235103310319147341214480736689719855550298904337697187500"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
} else {
EXPECT_FALSE(checker->canHandle(tasks[0]));
@ -512,10 +512,10 @@ namespace {
// LTL not supported in all engines (Hybrid, PrismDd, JaniDd)
if (TypeParam::engine == CtmcEngine::PrismSparse || TypeParam::engine == CtmcEngine::JaniSparse || TypeParam::engine == CtmcEngine::JitSparse) {
result = checker->check(this->env(), tasks[0]);
EXPECT_NEAR(this->parseNumber("0.49999689056660507"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
EXPECT_NEAR(this->parseNumber("80400/160801"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
result = checker->check(this->env(), tasks[1]);
EXPECT_NEAR(this->parseNumber("0.0074564831701838807"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
EXPECT_NEAR(this->parseNumber("601/80601"),this->getQuantitativeResultAtInitialState(model, result), this->precision());
} else {
EXPECT_FALSE(checker->canHandle(tasks[0]));

Loading…
Cancel
Save