Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360870 - smallint incorrectly evaulates to true for isa int test
Summary: smallint incorrectly evaulates to true for isa int test
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Huang Ji Yong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 12:49 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:18 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-10-13 12:49:44 EDT
Use EUNIT framework to test these variations.  Used build 201110120952


// basic library
library PassingTypes

  RESULT_COMPARE string; //char(2);            
  EXPECTED_COMPARE string; //char(2);
  hadFailure string; //char(1);
  myType string; //char(4);
  myLen smallInt;
  myDec smallInt;
 isA_OTHER_NUMS isA_OTHER_NUMS;
 
Function runOthersISAFunction002() {@Test}
    EXPECTED_COMPARE = "!=";    
    RESULT_COMPARE = "!=";
    if(isA_OTHER_NUMS.SMALLINT_A isa Int)
        RESULT_COMPARE = "==";
    end
    LogResult.assertStringEqual1(RESULT_COMPARE, EXPECTED_COMPARE);
end

Function runOthersISAFunction003() {@Test}
	local smallInt;
    EXPECTED_COMPARE = "!=";    
    RESULT_COMPARE = "!=";
    if(local isa Int)
        RESULT_COMPARE = "==";
    end
    LogResult.assertStringEqual1(RESULT_COMPARE, EXPECTED_COMPARE);
end

Function runOthersISAFunction004() {@Test}
	local smallInt;
    EXPECTED_COMPARE = "==";    
    RESULT_COMPARE = "!=";
    if(local isa smallInt)
        RESULT_COMPARE = "==";
    end
    LogResult.assertStringEqual1(RESULT_COMPARE, EXPECTED_COMPARE);
end
	
end

Record isA_OTHER_NUMS 
// Other miscellaneous numbers, without decimal places  
  SMALLINT_A smallint ; 
  INT_A int ; 
  BIGINT_A bigint ;  
  smallFloat_A smallFloat;
  float_A float;
end // end isA_OTHER_NUMS
Comment 1 Huang Ji Yong CLA 2011-11-14 21:37:04 EST
Fixed already in new build
Comment 2 Kathy Carroll CLA 2011-11-16 12:55:06 EST
verified 20111115_2101 and closed