================ DialogEntityDefEditor::OnBnClickedTest ================ */
| 696 | ================ |
| 697 | */ |
| 698 | void 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 | ================ |
nothing calls this directly
no test coverage detected