summaryrefslogtreecommitdiffstats
path: root/src/piklab-test/base/generator_check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/piklab-test/base/generator_check.cpp')
-rw-r--r--src/piklab-test/base/generator_check.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/piklab-test/base/generator_check.cpp b/src/piklab-test/base/generator_check.cpp
index 68ad2c5..5819188 100644
--- a/src/piklab-test/base/generator_check.cpp
+++ b/src/piklab-test/base/generator_check.cpp
@@ -92,21 +92,21 @@ bool GeneratorCheck::execute(const Device::Data &data)
// run compiler
Process::State state = Process::runSynchronously(*_helper->_cprocess, Process::Start, 2000); // 2s timeout
if ( state!=Process::Exited ) TEST_FAILED_RETURN("Error while running compilation")
- if ( _helper->_cprocess->exitCode()!=0 ) TEST_FAILED_RETURN(QString("Error in compilation for %1:\n%2%3").arg(data.name()).arg(_helper->_cprocess->sout()+_helper->_cprocess->serr()).arg(QString::null))
+ if ( _helper->_cprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in compilation for %1:\n%2%3").tqarg(data.name()).tqarg(_helper->_cprocess->sout()+_helper->_cprocess->serr()).tqarg(TQString()))
// run linker
if (_helper->_lprocess) {
state = Process::runSynchronously(*_helper->_lprocess, Process::Start, 2000); // 2s timeout
if ( state!=Process::Exited ) TEST_FAILED_RETURN("Error while running linking")
- if ( _helper->_lprocess->exitCode()!=0 ) TEST_FAILED_RETURN(QString("Error in linking for %1:\n%2%3").arg(data.name()).arg(_helper->_lprocess->sout()+_helper->_lprocess->serr()).arg(QString::null))
+ if ( _helper->_lprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in linking for %1:\n%2%3").tqarg(data.name()).tqarg(_helper->_lprocess->sout()+_helper->_lprocess->serr()).tqarg(TQString()))
}
// load hex file
if ( !_fhex->openForRead() ) TEST_FAILED_RETURN("")
- QStringList errors, warnings;
+ TQStringList errors, warnings;
Device::Memory::WarningTypes warningTypes;
- if ( !_memory1->load(_fhex->stream(), errors, warningTypes, warnings) ) TEST_FAILED_RETURN(QString("Error loading hex into memory: %1").arg(errors.join(" ")))
- //if ( warningTypes!=Device::Memory::NoWarning ) TEST_FAILED(QString("Warning loading hex into memory: %1").arg(warnings.join(" ")))
+ if ( !_memory1->load(_fhex->stream(), errors, warningTypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex into memory: %1").tqarg(errors.join(" ")))
+ //if ( warningTypes!=Device::Memory::NoWarning ) TEST_FAILED(TQString("Warning loading hex into memory: %1").tqarg(warnings.join(" ")))
TEST_PASSED
return true;
@@ -129,11 +129,11 @@ bool ConfigGeneratorCheck::execute(const Device::Data &data)
bool ok = false;
for (uint i=0; i<config._words.count(); i++) {
const Pic::Config::Word &cword = config._words[i];
- for (uint k=0; k<cword.masks.count(); k++) {
- const Pic::Config::Mask &cmask = cword.masks[k];
- if ( l<cmask.values.count() ) {
+ for (uint k=0; k<cword.tqmasks.count(); k++) {
+ const Pic::Config::Mask &ctqmask = cword.tqmasks[k];
+ if ( l<ctqmask.values.count() ) {
ok = true;
- if ( !cmask.values[l].name.isEmpty() ) _memory2->setConfigValue(cmask.name, cmask.values[l].name);
+ if ( !ctqmask.values[l].name.isEmpty() ) _memory2->setConfigValue(ctqmask.name, ctqmask.values[l].name);
}
}
}
@@ -157,23 +157,23 @@ bool ConfigGeneratorCheck::execute(const Device::Data &data)
BitValue word1 = _memory1->word(Pic::MemoryRangeType::Config, i);
BitValue word2 = _memory2->word(Pic::MemoryRangeType::Config, i);
if ( word1==word2 ) continue;
- for (uint k=0; k<cword.masks.count(); k++) {
- const Pic::Config::Mask &cmask = cword.masks[k];
- if ( cmask.value.isInside(cword.pmask) ) continue;
- BitValue value1 = word1.maskWith(cmask.value);
- BitValue value2 = word2.maskWith(cmask.value);
+ for (uint k=0; k<cword.tqmasks.count(); k++) {
+ const Pic::Config::Mask &ctqmask = cword.tqmasks[k];
+ if ( ctqmask.value.isInside(cword.ptqmask) ) continue;
+ BitValue value1 = word1.tqmaskWith(ctqmask.value);
+ BitValue value2 = word2.tqmaskWith(ctqmask.value);
if ( value1==value2 ) continue;
- QString name1, name2;
+ TQString name1, name2;
uint l1, l2;
- for (uint l=0; l<cmask.values.count(); l++) {
- const Pic::Config::Value &value = cmask.values[l];
+ for (uint l=0; l<ctqmask.values.count(); l++) {
+ const Pic::Config::Value &value = ctqmask.values[l];
if ( value.value==value1 ) { name1 = value.name; l1 = l; }
if ( value.value==value2 ) { name2 = value.name; l2 = l; }
}
if ( name1==name2 ) continue;
- TEST_FAILED_RETURN(QString("Config bits are different in %1: set\"%2\"=(%3) != compiled=%4)")
- .arg(cmask.name).arg(cmask.values[l2].name)
- .arg(toHexLabel(word2.maskWith(cmask.value), nbChars)).arg(toHexLabel(word1.maskWith(cmask.value), nbChars)))
+ TEST_FAILED_RETURN(TQString("Config bits are different in %1: set\"%2\"=(%3) != compiled=%4)")
+ .tqarg(ctqmask.name).tqarg(ctqmask.values[l2].name)
+ .tqarg(toHexLabel(word2.tqmaskWith(ctqmask.value), nbChars)).tqarg(toHexLabel(word1.tqmaskWith(ctqmask.value), nbChars)))
}
}
}
@@ -198,7 +198,7 @@ bool TemplateGeneratorCheck::init(const Device::Data &data)
PURL::ToolType ttype = sfamily.data().toolType;
SourceLine::List lines = _helper->generator()->templateSourceFile(ttype, data, ok);
_source = SourceLine::text(sfamily, lines, 2);
- if (!ok) TEST_FAILED_RETURN(QString("Incomplete template generator for %1").arg(data.name()))
+ if (!ok) TEST_FAILED_RETURN(TQString("Incomplete template generator for %1").tqarg(data.name()))
return true;
}
@@ -211,7 +211,7 @@ GPUtilsGeneratorCheckHelper::GPUtilsGeneratorCheckHelper()
void GPUtilsGeneratorCheckHelper::initSupported()
{
Process::StringOutput p;
- QStringList options;
+ TQStringList options;
options += "-l";
p.setup("gpasm", options, false);
Process::runSynchronously(p, Process::Start, 2000); // 2s timeout
@@ -221,7 +221,7 @@ void GPUtilsGeneratorCheckHelper::initSupported()
bool GPUtilsGeneratorCheckHelper::init(const Device::Data &data)
{
_cprocess = new Process::StringOutput;
- QStringList options;
+ TQStringList options;
options = "-c";
options += "-p" + GPUtils::toDeviceName(data.name());
options += "test.asm";
@@ -257,8 +257,8 @@ void SDCCGeneratorCheckHelper::initSupported()
_supported.clear();
for (uint i=0; i<SDCC::Nb_Families; i++) {
Process::StringOutput p;
- QStringList options;
- options += QString("-m") + SDCC::FAMILY_DATA[i].name;
+ TQStringList options;
+ options += TQString("-m") + SDCC::FAMILY_DATA[i].name;
options += "-phelp";
options += "test.c";
p.setup("sdcc", options, false);
@@ -270,8 +270,8 @@ void SDCCGeneratorCheckHelper::initSupported()
bool SDCCGeneratorCheckHelper::init(const Device::Data &data)
{
_cprocess = new Process::StringOutput;
- QStringList options;
- options += QString("-m") + SDCC::FAMILY_DATA[SDCC::family(data.name())].name;
+ TQStringList options;
+ options += TQString("-m") + SDCC::FAMILY_DATA[SDCC::family(data.name())].name;
options += "-" + SDCC::toDeviceName(data.name());
options += "test.c";
options += "-I/usr/share/gputils/header";