Skip to content

Commit

Permalink
GP-0: Fixing cycle group tests and help
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmkurtz committed Nov 22, 2024
1 parent b95350f commit 9a4da4e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ <H3>Drag from Data Type Manager</H3>
</BLOCKQUOTE>

<H3><A name="DataCycleGroups"></A><A name="Cycle__byte_word_dword_qword"></A><A name=
"Cycle__float_double"></A> <A name="Cycle__char_string_unicode"></A>Cycle Groups</H3>
"Cycle__float_double_longdouble"></A> <A name="Cycle__char_string_unicode"></A>Cycle Groups</H3>

<BLOCKQUOTE>
<P>Cycle Groups are an easy way to apply <I>basic</I> data types (byte, word, float,
Expand Down Expand Up @@ -638,15 +638,15 @@ <H3><A name="DataCycleGroups"></A><A name="Cycle__byte_word_dword_qword"></A><A
<TR>
<TD width="19%"><B>'</B> (single quote)&nbsp;</TD>

<TD width="81%">Ascii <IMG src="help/shared/arrow.gif"> String <IMG src=
"help/shared/arrow.gif"> Unicode <IMG src="help/shared/arrow.gif"> Ascii</TD>
<TD width="81%">Char <IMG src="help/shared/arrow.gif"> String <IMG src=
"help/shared/arrow.gif"> Unicode <IMG src="help/shared/arrow.gif"> Char</TD>
</TR>

<TR>
<TD width="19%"><B>f</B>&nbsp;</TD>

<TD width="81%">Float <IMG src="help/shared/arrow.gif"> Double <IMG src=
"help/shared/arrow.gif"> Float</TD>
"help/shared/arrow.gif"> LongDouble <IMG src="help/shared/arrow.gif"> Float</TD>
</TR>
</TBODY>
</TABLE>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -86,7 +86,7 @@ protected static Set<String> 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";

Expand Down Expand Up @@ -182,7 +182,7 @@ protected void checkActions(Set<DockingActionIf> 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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1292,7 +1292,7 @@ protected void checkOnUndefined(Set<DockingActionIf> 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);
Expand Down Expand Up @@ -1360,7 +1360,7 @@ protected void checkOnDefined(Set<DockingActionIf> 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);
Expand Down Expand Up @@ -1423,7 +1423,7 @@ protected void checkOnArray(Set<DockingActionIf> 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);
Expand Down Expand Up @@ -1471,7 +1471,7 @@ protected void checkOnStructure(Set<DockingActionIf> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<DockingActionIf> actions = getDataPluginActions();
assertEquals(ACTION_COUNT, actions.size());
Expand All @@ -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);

Expand All @@ -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();
Expand All @@ -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);

Expand Down

0 comments on commit 9a4da4e

Please sign in to comment.