mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 21:06:03 +08:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-9-29-25'
This commit is contained in:
+6
-28
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -129,30 +129,6 @@ public class ToolPluginOptionsTest extends AbstractGhidraHeadedIntegrationTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testOptionsWithoutRegisteredOwnerGoAway() {
|
|
||||||
//
|
|
||||||
// Test that an option value that is not set or read will disappear after saving the
|
|
||||||
// owning tool.
|
|
||||||
//
|
|
||||||
|
|
||||||
Options options = loadSearchOptions();
|
|
||||||
|
|
||||||
Pair<String, String> changedOption = changeStringTestOption(options);
|
|
||||||
|
|
||||||
//
|
|
||||||
// See if the options are there again after saving and reloading. They should be there,
|
|
||||||
// since the previous operation set the value. We are careful here to simply check
|
|
||||||
// for the options existence, but not to retrieve it, as doing so would trigger the
|
|
||||||
// option to be stored again.
|
|
||||||
//
|
|
||||||
options = saveAndLoadOptions();
|
|
||||||
verifyStringOptionStillChanged_WithoutUsingOptionsAPI(options, changedOption.first);
|
|
||||||
|
|
||||||
options = saveAndLoadOptions();
|
|
||||||
verifyUnusedOptionNoLongerHasEntry(options, changedOption.first);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSaveOnlyNonDefaultOptions() {
|
public void testSaveOnlyNonDefaultOptions() {
|
||||||
ToolOptions options = loadSearchOptions();
|
ToolOptions options = loadSearchOptions();
|
||||||
@@ -177,6 +153,8 @@ public class ToolPluginOptionsTest extends AbstractGhidraHeadedIntegrationTest {
|
|||||||
// Repeatedly save/load options, accessing them each time, and make sure that they
|
// Repeatedly save/load options, accessing them each time, and make sure that they
|
||||||
// re-appear each load.
|
// re-appear each load.
|
||||||
//
|
//
|
||||||
|
// Note: options removal is now controlled through use of an age-off mechanism
|
||||||
|
//
|
||||||
|
|
||||||
Options options = loadSearchOptions();
|
Options options = loadSearchOptions();
|
||||||
|
|
||||||
@@ -194,11 +172,11 @@ public class ToolPluginOptionsTest extends AbstractGhidraHeadedIntegrationTest {
|
|||||||
verifyStringOptionsStillChanged_UsingTheOptionsAPI(options, changedOption);
|
verifyStringOptionsStillChanged_UsingTheOptionsAPI(options, changedOption);
|
||||||
|
|
||||||
//
|
//
|
||||||
// now save twice in a row without accessing and the untouched option should be gone
|
// now save twice in a row without accessing and the untouched option should *not* be gone
|
||||||
//
|
//
|
||||||
options = saveAndLoadOptions();
|
options = saveAndLoadOptions();
|
||||||
options = saveAndLoadOptions();
|
options = saveAndLoadOptions();
|
||||||
verifyUnusedOptionNoLongerHasEntry(options, changedOption.first);
|
verifyStringOptionsStillChanged_UsingTheOptionsAPI(options, changedOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user