diff --git a/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm b/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm index 02cb4335713..43e448a8295 100644 --- a/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm +++ b/Ghidra/Features/Base/src/main/help/help/topics/DataPlugin/Data.htm @@ -610,7 +610,7 @@

Drag from Data Type Manager

Cycle Groups

+ "Cycle__float_double_longdouble"> Cycle Groups

Cycle Groups are an easy way to apply basic data types (byte, word, float, @@ -638,15 +638,15 @@

' (single quote)  - Ascii String Unicode Ascii + Char String Unicode Char f  Float Double Float + "help/shared/arrow.gif"> LongDouble Float diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/AbstractDataActionTest.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/AbstractDataActionTest.java index b9ca00466ed..e950e4115d7 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/AbstractDataActionTest.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/AbstractDataActionTest.java @@ -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. @@ -86,7 +86,7 @@ protected static Set createFormatTestSkipList() { protected static final String CHOOSE_DATA_TYPE = "Choose Data Type"; // CycleGroupAction's - protected static final String CYCLE_FLOAT_DOUBLE = "Cycle: float,double"; + protected static final String CYCLE_FLOAT_DOUBLE_LONGDOUBLE = "Cycle: float,double,longdouble"; protected static final String CYCLE_BYTE_WORD_DWORD_QWORD = "Cycle: byte,word,dword,qword"; protected static final String CYCLE_CHAR_STRING_UNICODE = "Cycle: char,string,unicode"; @@ -182,7 +182,7 @@ protected void checkActions(Set actions, boolean enabled, Strin checkAction(actions, CHOOSE_DATA_TYPE, enabled, caseStr); checkAction(actions, DEFAULT_SETTINGS, enabled, caseStr); checkAction(actions, DATA_SETTINGS, enabled, caseStr); - checkAction(actions, CYCLE_FLOAT_DOUBLE, enabled, caseStr); + checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, enabled, caseStr); checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, enabled, caseStr); checkAction(actions, CYCLE_CHAR_STRING_UNICODE, enabled, caseStr); checkAction(actions, DEFINE_BYTE, enabled, caseStr); @@ -1248,7 +1248,7 @@ else if (dt instanceof Array) { checkAction(actions, CREATE_ARRAY, false, caseName); checkAction(actions, DEFAULT_SETTINGS, hasSettings, caseName); checkAction(actions, DATA_SETTINGS, hasSettings, caseName); - checkAction(actions, CYCLE_FLOAT_DOUBLE, false, caseName); + checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, false, caseName); checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, false, caseName); checkAction(actions, CYCLE_CHAR_STRING_UNICODE, false, caseName); checkAction(actions, DEFINE_BYTE, false, caseName); @@ -1292,7 +1292,7 @@ protected void checkOnUndefined(Set actions) { checkAction(actions, CREATE_ARRAY, true, caseName); checkAction(actions, DEFAULT_SETTINGS, false, caseName); checkAction(actions, DATA_SETTINGS, hasNormalUnitSelection, caseName); - checkAction(actions, CYCLE_FLOAT_DOUBLE, true, caseName); + checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true, caseName); checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, true, caseName); checkAction(actions, CYCLE_CHAR_STRING_UNICODE, true, caseName); checkAction(actions, DEFINE_BYTE, true, caseName); @@ -1360,7 +1360,7 @@ protected void checkOnDefined(Set actions, Class expectedDat checkAction(actions, DEFAULT_SETTINGS, (!hasSelection || isSelectionJustSingleDataInstance(sel, d)) && hasSettings, caseName); checkAction(actions, DATA_SETTINGS, hasNormalUnitSelection || hasSettings, caseName); - checkAction(actions, CYCLE_FLOAT_DOUBLE, onFloatDoubleData, caseName); + checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, onFloatDoubleData, caseName); checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, onByteWordData, caseName); checkAction(actions, CYCLE_CHAR_STRING_UNICODE, onCharData, caseName); checkAction(actions, DEFINE_BYTE, true, caseName); @@ -1423,7 +1423,7 @@ protected void checkOnArray(Set actions, DataType interiorDt, i checkAction(actions, DEFAULT_SETTINGS, hasSettings && (!hasSelection || isSelectionJustSingleDataInstance(sel, d)), caseName); checkAction(actions, DATA_SETTINGS, hasSettings, caseName); - checkAction(actions, CYCLE_FLOAT_DOUBLE, true, caseName); + checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true, caseName); checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, true, caseName); checkAction(actions, CYCLE_CHAR_STRING_UNICODE, true, caseName); checkAction(actions, DEFINE_BYTE, true, caseName); @@ -1471,7 +1471,7 @@ protected void checkOnStructure(Set actions, int structSize) { checkAction(actions, CREATE_ARRAY, true, caseName); checkAction(actions, DEFAULT_SETTINGS, false, caseName); checkAction(actions, DATA_SETTINGS, hasNormalUnitSelection, caseName); - checkAction(actions, CYCLE_FLOAT_DOUBLE, true, caseName); + checkAction(actions, CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true, caseName); checkAction(actions, CYCLE_BYTE_WORD_DWORD_QWORD, true, caseName); checkAction(actions, CYCLE_CHAR_STRING_UNICODE, true, caseName); checkAction(actions, DEFINE_BYTE, true, caseName); diff --git a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataAction4Test.java b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataAction4Test.java index c24b1ff045c..d7a82d04e8f 100644 --- a/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataAction4Test.java +++ b/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/DataAction4Test.java @@ -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. @@ -410,7 +410,7 @@ public void testFloatCycle() { gotoLocation(0x010069f2); assertTrue("Undefined data expected", !getContextData().isDefined()); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); Set actions = getDataPluginActions(); assertEquals(ACTION_COUNT, actions.size()); @@ -430,11 +430,15 @@ public void testFloatCycle() { doAction(RECENTLY_USED, true); checkOnDefined(actions, FloatDataType.class); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); actions = getDataPluginActions(); checkOnDefined(actions, DoubleDataType.class); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); + actions = getDataPluginActions(); + checkOnDefined(actions, LongDoubleDataType.class); + + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); actions = getDataPluginActions(); checkOnDefined(actions, FloatDataType.class); @@ -445,13 +449,16 @@ public void testFloatCycle() { makeSelection(0x01006a00, 0x01006a12); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); checkDataType(0x01006a00, 0x01006a12, FloatDataType.class, 5, 0); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); checkDataType(0x01006a00, 0x01006a12, DoubleDataType.class, 3, 0); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); + checkDataType(0x01006a00, 0x01006a12, LongDoubleDataType.class, 3, 0); + + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); checkDataType(0x01006a00, 0x01006a12, FloatDataType.class, 5, 0); clearSelection(); @@ -462,11 +469,11 @@ public void testFloatCycle() { actions = getDataPluginActions(); checkOnUndefined(actions); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); actions = getDataPluginActions(); checkOnDefined(actions, FloatDataType.class); - doAction(CYCLE_FLOAT_DOUBLE, true); + doAction(CYCLE_FLOAT_DOUBLE_LONGDOUBLE, true); actions = getDataPluginActions(); checkOnUndefined(actions);