Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360870

Summary: smallint incorrectly evaulates to true for isa int test
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Huang Ji Yong <hjiyong>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: hjiyong, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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