MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / OnBnClickedTest

Method OnBnClickedTest

neo/tools/decl/DialogEntityDefEditor.cpp:698–720  ·  view source on GitHub ↗

================ DialogEntityDefEditor::OnBnClickedTest ================ */

Source from the content-addressed store, hash-verified

696================
697*/
698void DialogEntityDefEditor::OnBnClickedTest() {
699 idStr declText, oldDeclText;
700
701 if ( decl ) {
702
703 BuildDeclText(declText);
704
705 if ( !TestDecl( declText ) ) {
706 return;
707 }
708
709 char *oldDeclText = (char *)_alloca( ( decl->GetTextLength() + 1 ) * sizeof( char ) );
710 decl->GetText( oldDeclText );
711 decl->SetText( declText );
712 decl->Invalidate();
713 declManager->DeclByIndex( decl->GetType(), decl->Index(), true );
714 decl->SetText( oldDeclText );
715 decl->Invalidate();
716 common->Printf( "tested %s\n", decl->GetName() );
717
718 testButton.EnableWindow( FALSE );
719 }
720}
721
722/*
723================

Callers

nothing calls this directly

Calls 9

DeclByIndexMethod · 0.80
GetTextLengthMethod · 0.45
GetTextMethod · 0.45
SetTextMethod · 0.45
InvalidateMethod · 0.45
GetTypeMethod · 0.45
IndexMethod · 0.45
PrintfMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected