11/* Reverse Engineer's Hex Editor
2- * Copyright (C) 2019-2024 Daniel Collins <solemnwarning@solemnwarning.net>
2+ * Copyright (C) 2019-2025 Daniel Collins <solemnwarning@solemnwarning.net>
33 *
44 * This program is free software; you can redistribute it and/or modify it
55 * under the terms of the GNU General Public License version 2 as published by
@@ -262,8 +262,8 @@ TEST(CommentTree, NoComments)
262262{
263263 SharedDocumentPointer doc (SharedDocumentPointer::make ());
264264
265- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
266- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
265+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
266+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
267267
268268 unsigned char z1k[1024 ];
269269 memset (z1k, 0 , 1024 );
@@ -283,8 +283,8 @@ TEST(CommentTree, SingleComment)
283283{
284284 SharedDocumentPointer doc (SharedDocumentPointer::make ());
285285
286- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
287- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
286+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
287+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
288288
289289 unsigned char z1k[1024 ];
290290 memset (z1k, 0 , 1024 );
@@ -311,8 +311,8 @@ TEST(CommentTree, MultipleComments)
311311{
312312 SharedDocumentPointer doc (SharedDocumentPointer::make ());
313313
314- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
315- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
314+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
315+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
316316
317317 unsigned char z1k[1024 ];
318318 memset (z1k, 0 , 1024 );
@@ -345,8 +345,8 @@ TEST(CommentTree, Heirarchy)
345345{
346346 SharedDocumentPointer doc (SharedDocumentPointer::make ());
347347
348- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
349- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
348+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
349+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
350350
351351 unsigned char z1k[1024 ];
352352 memset (z1k, 0 , 1024 );
@@ -396,8 +396,8 @@ TEST(CommentTree, EraseRootCommentNoChildren)
396396{
397397 SharedDocumentPointer doc (SharedDocumentPointer::make ());
398398
399- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
400- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
399+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
400+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
401401
402402 unsigned char z1k[1024 ];
403403 memset (z1k, 0 , 1024 );
@@ -431,8 +431,8 @@ TEST(CommentTree, EraseRootCommentWithChildren)
431431{
432432 SharedDocumentPointer doc (SharedDocumentPointer::make ());
433433
434- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
435- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
434+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
435+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
436436
437437 unsigned char z1k[1024 ];
438438 memset (z1k, 0 , 1024 );
@@ -492,8 +492,8 @@ TEST(CommentTree, EraseNestedCommentNoChildren)
492492{
493493 SharedDocumentPointer doc (SharedDocumentPointer::make ());
494494
495- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
496- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
495+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
496+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
497497
498498 unsigned char z1k[1024 ];
499499 memset (z1k, 0 , 1024 );
@@ -523,8 +523,8 @@ TEST(CommentTree, EraseNestedCommentWithChildren)
523523{
524524 SharedDocumentPointer doc (SharedDocumentPointer::make ());
525525
526- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
527- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
526+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
527+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
528528
529529 unsigned char z1k[1024 ];
530530 memset (z1k, 0 , 1024 );
@@ -558,8 +558,8 @@ TEST(CommentTree, AddCommentRoot)
558558{
559559 SharedDocumentPointer doc (SharedDocumentPointer::make ());
560560
561- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
562- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
561+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
562+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
563563
564564 unsigned char z1k[1024 ];
565565 memset (z1k, 0 , 1024 );
@@ -595,8 +595,8 @@ TEST(CommentTree, AddNestedComment)
595595{
596596 SharedDocumentPointer doc (SharedDocumentPointer::make ());
597597
598- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
599- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
598+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
599+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
600600
601601 unsigned char z1k[1024 ];
602602 memset (z1k, 0 , 1024 );
@@ -634,8 +634,8 @@ TEST(CommentTree, AddContainingComment)
634634{
635635 SharedDocumentPointer doc (SharedDocumentPointer::make ());
636636
637- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
638- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
637+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
638+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
639639
640640 unsigned char z1k[1024 ];
641641 memset (z1k, 0 , 1024 );
@@ -723,8 +723,8 @@ TEST(CommentTree, ModifyComment)
723723{
724724 SharedDocumentPointer doc (SharedDocumentPointer::make ());
725725
726- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
727- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
726+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
727+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
728728
729729 unsigned char z1k[1024 ];
730730 memset (z1k, 0 , 1024 );
@@ -759,8 +759,8 @@ TEST(CommentTree, SetFilter)
759759{
760760 SharedDocumentPointer doc (SharedDocumentPointer::make ());
761761
762- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
763- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
762+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
763+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
764764
765765 unsigned char z1k[1024 ];
766766 memset (z1k, 0 , 1024 );
@@ -793,8 +793,8 @@ TEST(CommentTree, ClearFilter)
793793{
794794 SharedDocumentPointer doc (SharedDocumentPointer::make ());
795795
796- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
797- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
796+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
797+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
798798
799799 unsigned char z1k[1024 ];
800800 memset (z1k, 0 , 1024 );
@@ -841,8 +841,8 @@ TEST(CommentTree, ChangeFilter)
841841{
842842 SharedDocumentPointer doc (SharedDocumentPointer::make ());
843843
844- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
845- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
844+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
845+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
846846
847847 unsigned char z1k[1024 ];
848848 memset (z1k, 0 , 1024 );
@@ -887,8 +887,8 @@ TEST(CommentTree, FilterMatchesRootNode)
887887{
888888 SharedDocumentPointer doc (SharedDocumentPointer::make ());
889889
890- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
891- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
890+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
891+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
892892
893893 unsigned char z1k[1024 ];
894894 memset (z1k, 0 , 1024 );
@@ -922,8 +922,8 @@ TEST(CommentTree, FilterMatchesIntermediateNode)
922922{
923923 SharedDocumentPointer doc (SharedDocumentPointer::make ());
924924
925- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
926- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
925+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
926+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
927927
928928 unsigned char z1k[1024 ];
929929 memset (z1k, 0 , 1024 );
@@ -961,8 +961,8 @@ TEST(CommentTree, FilterMatchesDeepNode)
961961{
962962 SharedDocumentPointer doc (SharedDocumentPointer::make ());
963963
964- wxFrame frame (NULL , wxID_ANY, " REHex Tests" );
965- DocumentCtrl *doc_ctrl = new DocumentCtrl (& frame, doc);
964+ AutoFrame frame (NULL , wxID_ANY, " REHex Tests" );
965+ DocumentCtrl *doc_ctrl = new DocumentCtrl (frame. frame , doc);
966966
967967 unsigned char z1k[1024 ];
968968 memset (z1k, 0 , 1024 );
0 commit comments