| 42 | EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter) |
| 43 | |
| 44 | bool FMjActuatorMotorActuatorBinds::RunTest(const FString& Parameters) |
| 45 | { |
| 46 | UMjMotorActuator* Actuator = nullptr; |
| 47 | |
| 48 | FMjUESession S; |
| 49 | if (!S.Init([&Actuator](FMjUESession& Sess) { |
| 50 | Sess.Joint->Type = EMjJointType::Hinge; |
| 51 | Sess.Joint->bOverride_Type = true; |
| 52 | |
| 53 | Actuator = NewObject<UMjMotorActuator>(Sess.Robot, TEXT("TestActuator")); |
| 54 | Actuator->TargetName = TEXT("TestJoint"); |
| 55 | Actuator->RegisterComponent(); |
| 56 | })) |
| 57 | { |
| 58 | AddError(FString::Printf(TEXT("FMjUESession::Init failed: %s"), *S.LastError)); |
| 59 | S.Cleanup(); |
| 60 | return false; |
| 61 | } |
| 62 | |
| 63 | TestNotNull(TEXT("Actuator should not be null after Init"), Actuator); |
| 64 | if (Actuator) |
| 65 | { |
| 66 | TestTrue(TEXT("Actuator->m_ActuatorView.id should be >= 0 after Bind()"), |
| 67 | Actuator->m_ActuatorView.id >= 0); |
| 68 | } |
| 69 | |
| 70 | TestEqual(TEXT("Manager->PhysicsEngine->m_model->nu should be 1"), |
| 71 | (int)S.Manager->PhysicsEngine->m_model->nu, 1); |
| 72 | |
| 73 | S.Cleanup(); |
| 74 | return true; |
| 75 | } |
| 76 | |
| 77 | // ============================================================================ |
| 78 | // URLab.Actuator.MotorActuator_SetControl |
nothing calls this directly
no test coverage detected