mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Update BfCompiler.cpp
Added name attribute
This commit is contained in:
parent
e98681d668
commit
288eb9eaad
1 changed files with 14 additions and 2 deletions
|
@ -961,9 +961,21 @@ void BfCompiler::EmitTestMethod(BfVDataModule* bfModule, Array<TestMethod>& test
|
|||
{
|
||||
testMethod.mName += "Ig";
|
||||
}
|
||||
else if (fieldDef->mName == "Name")
|
||||
}
|
||||
else if ((constant != NULL) && (constant->mTypeCode == BfTypeCode_StringId))
|
||||
{
|
||||
testMethod.mName += "Ovwn";
|
||||
BfFieldDef* fieldDef = field.mFieldRef;
|
||||
if (fieldDef->mName == "Name")
|
||||
{
|
||||
String* str = bfModule->GetStringPoolString(field.mParam.mValue, typeInstance->mConstHolder);
|
||||
testMethod.mName += "Name";
|
||||
String* temp = new String(*str);
|
||||
temp->Replace('\t', "\\t"); //Good enough for now
|
||||
temp->Replace('\n', "\\n");
|
||||
temp->Replace('\a', "\\a");
|
||||
temp->Replace('\v', "\\v");
|
||||
testMethod.mName += *temp;
|
||||
testMethod.mName += "\a";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue