| 180 | "URLab.Muscle.Arm26_Counts", |
| 181 | EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter) |
| 182 | bool FTest_MjMuscle_Arm26_Counts::RunTest(const FString&) |
| 183 | { |
| 184 | FMjTestSession Ref; |
| 185 | if (!Ref.CompileXml(ARM26_XML)) |
| 186 | { |
| 187 | AddError(Ref.LastError); |
| 188 | return false; |
| 189 | } |
| 190 | |
| 191 | FMjXmlImportSession S; |
| 192 | if (!S.Init(ARM26_XML)) |
| 193 | { |
| 194 | AddError(S.LastError); |
| 195 | Ref.Cleanup(); |
| 196 | return false; |
| 197 | } |
| 198 | |
| 199 | // Pre-compile diagnostic: how many component templates did the importer create? |
| 200 | AddInfo(FString::Printf(TEXT("templates: UMjMuscleActuator=%d, UMjTendon=%d, UMjSite=%d"), |
| 201 | S.CountTemplates<class UMjMuscleActuator>(), |
| 202 | S.CountTemplates<class UMjTendon>(), |
| 203 | S.CountTemplates<class UMjSite>())); |
| 204 | |
| 205 | if (!S.Compile()) |
| 206 | { |
| 207 | AddError(S.LastError); |
| 208 | S.Cleanup(); |
| 209 | Ref.Cleanup(); |
| 210 | return false; |
| 211 | } |
| 212 | |
| 213 | TestEqual(TEXT("nbody"), (int)S.Model()->nbody, (int)Ref.m->nbody); |
| 214 | TestEqual(TEXT("ngeom"), (int)S.Model()->ngeom, (int)Ref.m->ngeom); |
| 215 | TestEqual(TEXT("ntendon"), (int)S.Model()->ntendon, (int)Ref.m->ntendon); |
| 216 | TestEqual(TEXT("nu"), (int)S.Model()->nu, (int)Ref.m->nu); |
| 217 | TestEqual(TEXT("nsite"), (int)S.Model()->nsite, (int)Ref.m->nsite); |
| 218 | |
| 219 | S.Cleanup(); |
| 220 | Ref.Cleanup(); |
| 221 | return true; |
| 222 | } |
| 223 | |
| 224 | // For every muscle in arm26, verify dyntype / gaintype / biastype and the |
| 225 | // full dynprm / gainprm / biasprm vectors match the native-parse reference |
nothing calls this directly
no test coverage detected