mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 01:39:21 +02:00
Test fixes
This commit is contained in:
parent
a3b327c411
commit
5c5f577560
1 changed files with 6 additions and 28 deletions
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* 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
|
||||
public void testSaveOnlyNonDefaultOptions() {
|
||||
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
|
||||
// re-appear each load.
|
||||
//
|
||||
// Note: options removal is now controlled through use of an age-off mechanism
|
||||
//
|
||||
|
||||
Options options = loadSearchOptions();
|
||||
|
||||
|
@ -194,11 +172,11 @@ public class ToolPluginOptionsTest extends AbstractGhidraHeadedIntegrationTest {
|
|||
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();
|
||||
verifyUnusedOptionNoLongerHasEntry(options, changedOption.first);
|
||||
verifyStringOptionsStillChanged_UsingTheOptionsAPI(options, changedOption);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue