Exemple #1
0
void TestGetSetCompareProperty(CuTest* tc) {
	TextProperty* pro;
	char* data;
	int repeat;
	// test null
	pro = createTextProperty();
	setTextProperty(pro, NULL);
	CuAssertPtrEquals(tc, NULL, getTextProperty(pro));
	// test empty
	pro = createTextProperty();
	setTextProperty(pro, "");
	CuAssertStrEquals(tc, "", getTextProperty(pro));
	// test lots of random variations
	for (repeat=0; repeat<NUM_FAST_TESTS; repeat++) {
		data = randomString();
		pro  = createTextProperty();
		setTextProperty(pro, data);
		CuAssertStrEquals(tc, data, getTextProperty(pro));
		CuAssertIntEquals(tc, 0, strcmp(getTextProperty(pro), data));
		deleteTextProperty(pro);
	}
}
Exemple #2
0
BackendModel::BackendModel(QObject *parent) :
    ObjectModel(ObjectInfo<Backend>::classUuidProperty(), parent)
{
  setTextProperty( "title" );
  connect( this, &BackendModel::databaseChanged, this, &BackendModel::refresh );
}
Exemple #3
0
/// @todo restrict to setting valid nucleotides
void  setNucleotidesProperty(NucleotidesProperty *pro, const char *nucleotides) {
	if (pro)
		setTextProperty(pro->nucleotides, nucleotides);
}
Exemple #4
0
void setURIProperty(URIProperty* pro, const char* uri) {
	if (pro && pro->doc && uri && !isSBOLObjectURI(pro->doc, uri))
		setTextProperty(pro->uri, uri);
}
Exemple #5
0
void setSBOLCompoundObjectDescription(SBOLCompoundObject* obj, const char* descr) {
	if (obj) {
		setTextProperty(obj->description, descr);
	}
}
Exemple #6
0
void setSBOLCompoundObjectName(SBOLCompoundObject* obj, const char* name) {
	if (obj) {
		setTextProperty(obj->name, name);
	}
}
Exemple #7
0
void setSBOLCompoundObjectDisplayID(SBOLCompoundObject* obj, const char* id) {
	if (obj) {
		setTextProperty(obj->displayID, id);
	}
}