コード例 #1
0
 @Test
 public void test_08() {
   final IFeatureCallArguments arguments =
       this.toArgumentsWithReceiver("String s, int i", "\"\", 1");
   int _argumentCount = arguments.getArgumentCount();
   Assert.assertEquals(3, _argumentCount);
   boolean _hasUnprocessedArguments = arguments.hasUnprocessedArguments();
   Assert.assertTrue(_hasUnprocessedArguments);
   final IFeatureCallArgumentSlot firstSlot = arguments.getNextUnprocessedArgumentSlot();
   boolean _isVarArg = firstSlot.isVarArg();
   Assert.assertFalse(_isVarArg);
   boolean _isSuperfluous = firstSlot.isSuperfluous();
   Assert.assertFalse(_isSuperfluous);
   XExpression _argumentExpression = firstSlot.getArgumentExpression();
   Assert.assertTrue((_argumentExpression instanceof XStringLiteral));
   LightweightTypeReference _declaredType = firstSlot.getDeclaredType();
   String _simpleName = _declaredType.getSimpleName();
   Assert.assertEquals("String", _simpleName);
   boolean _isProcessed = arguments.isProcessed(0);
   Assert.assertTrue(_isProcessed);
   boolean _isProcessed_1 = arguments.isProcessed(1);
   Assert.assertFalse(_isProcessed_1);
   firstSlot.markProcessed();
   boolean _isProcessed_2 = arguments.isProcessed(1);
   Assert.assertTrue(_isProcessed_2);
   boolean _hasUnprocessedArguments_1 = arguments.hasUnprocessedArguments();
   Assert.assertTrue(_hasUnprocessedArguments_1);
   final IFeatureCallArgumentSlot secondSlot = arguments.getNextUnprocessedArgumentSlot();
   boolean _isVarArg_1 = secondSlot.isVarArg();
   Assert.assertTrue(_isVarArg_1);
   boolean _isSuperfluous_1 = secondSlot.isSuperfluous();
   Assert.assertFalse(_isSuperfluous_1);
   XExpression _argumentExpression_1 = secondSlot.getArgumentExpression();
   Assert.assertTrue((_argumentExpression_1 instanceof XNumberLiteral));
   LightweightTypeReference _declaredType_1 = secondSlot.getDeclaredType();
   String _simpleName_1 = _declaredType_1.getSimpleName();
   Assert.assertEquals("int", _simpleName_1);
   boolean _isProcessed_3 = arguments.isProcessed(2);
   Assert.assertFalse(_isProcessed_3);
   secondSlot.markProcessed();
   boolean _isProcessed_4 = arguments.isProcessed(2);
   Assert.assertTrue(_isProcessed_4);
   boolean _hasUnprocessedArguments_2 = arguments.hasUnprocessedArguments();
   Assert.assertFalse(_hasUnprocessedArguments_2);
 }
コード例 #2
0
 @Test
 public void test_03() {
   final IFeatureCallArguments arguments = this.toArgumentsWithoutReceiver("String s", "\"\"");
   boolean _hasUnprocessedArguments = arguments.hasUnprocessedArguments();
   Assert.assertTrue(_hasUnprocessedArguments);
   int _argumentCount = arguments.getArgumentCount();
   Assert.assertEquals(1, _argumentCount);
   final IFeatureCallArgumentSlot singleSlot = arguments.getNextUnprocessedArgumentSlot();
   boolean _isVarArg = singleSlot.isVarArg();
   Assert.assertTrue(_isVarArg);
   boolean _isSuperfluous = singleSlot.isSuperfluous();
   Assert.assertFalse(_isSuperfluous);
   XExpression _argumentExpression = singleSlot.getArgumentExpression();
   Assert.assertTrue((_argumentExpression instanceof XStringLiteral));
   LightweightTypeReference _declaredType = singleSlot.getDeclaredType();
   String _simpleName = _declaredType.getSimpleName();
   Assert.assertEquals("String", _simpleName);
   singleSlot.markProcessed();
   boolean _hasUnprocessedArguments_1 = arguments.hasUnprocessedArguments();
   Assert.assertFalse(_hasUnprocessedArguments_1);
 }