Beispiel #1
0
 public Prefs()
 {
     Ap = new Ap();
     Is = new Is();
     Lan = new Lan();
     Rta = new Rta();
 }
Beispiel #2
0
		public Palette(Color32[] cs, string name, Kind k, Is blindSafe, Is printSafe, Is xeroxSafe, Is panelSafe) {
			this.colors = cs;
			this.colorsReverse = new Color32[cs.Length];
			this.colors.CopyTo(this.colorsReverse, 0);
			Array.Reverse(this.colorsReverse);
			this.name = name;
			this.kind = k;
			this.blind = blindSafe;
			this.print = printSafe;
			this.xerox = xeroxSafe;
			this.panel = panelSafe;
			this.size = cs.Length;
			this.index = 0;
			this.hash = name + size;
		}
            public void Should_run_one_scenario()
            {
                var scenarioNodes = xmlOut.SelectNodes("//scenario");

                Assert.That(scenarioNodes.Count, Is.EqualTo(1));
            }
 public void Should_find_one_feature()
 {
     var storyNodes = xmlOut.SelectNodes("//feature");
     Assert.That(storyNodes.Count, Is.EqualTo(1));
 }
 public void TestResults_CounterIsCorrect(string name, int count)
 {
     Assert.That(RequiredAttribute(topNode, name), Is.EqualTo(count.ToString()));
 }
 public void Document_HasTestResults()
 {
     Assert.That(topNode, Is.Not.Null);
     Assert.That(topNode.Name, Is.EqualTo("test-results"));
 }
 public void Document_SecondChildIsComment()
 {
     Assume.That(doc.ChildNodes.Count >= 2);
     Assert.That(doc.ChildNodes[1].Name, Is.EqualTo("#comment"));
 }
  /** the generated parser.
      Maintains a state and a value stack, currently with fixed maximum size.
      @param yyLex scanner.
      @return result of the last reduction, if any.
      @throws yyException on irrecoverable parse error.
    */
  internal Object yyparse (yyParser.yyInput yyLex)
  {
    if (yyMax <= 0) yyMax = 256;		// initial size
    int yyState = 0;                   // state stack ptr
    int [] yyStates;               	// state stack 
    yyVal = null;
    yyToken = -1;
    int yyErrorFlag = 0;				// #tks to shift
	if (use_global_stacks && global_yyStates != null) {
		yyVals = global_yyVals;
		yyStates = global_yyStates;
   } else {
		yyVals = new object [yyMax];
		yyStates = new int [yyMax];
		if (use_global_stacks) {
			global_yyVals = yyVals;
			global_yyStates = yyStates;
		}
	}

    /*yyLoop:*/ for (yyTop = 0;; ++ yyTop) {
      if (yyTop >= yyStates.Length) {			// dynamically increase
        global::System.Array.Resize (ref yyStates, yyStates.Length+yyMax);
        global::System.Array.Resize (ref yyVals, yyVals.Length+yyMax);
      }
      yyStates[yyTop] = yyState;
      yyVals[yyTop] = yyVal;
//t      if (debug != null) debug.push(yyState, yyVal);

      /*yyDiscarded:*/ while (true) {	// discarding a token does not change stack
        int yyN;
        if ((yyN = yyDefRed[yyState]) == 0) {	// else [default] reduce (yyN)
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t              debug.lex(yyState, yyToken, yyname(yyToken), yyLex.value());
          }
          if ((yyN = yySindex[yyState]) != 0 && ((yyN += yyToken) >= 0)
              && (yyN < yyTable.Length) && (yyCheck[yyN] == yyToken)) {
//t            if (debug != null)
//t              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
            yyState = yyTable[yyN];		// shift to yyN
            yyVal = yyLex.value();
            yyToken = -1;
            if (yyErrorFlag > 0) -- yyErrorFlag;
            goto continue_yyLoop;
          }
          if ((yyN = yyRindex[yyState]) != 0 && (yyN += yyToken) >= 0
              && yyN < yyTable.Length && yyCheck[yyN] == yyToken)
            yyN = yyTable[yyN];			// reduce (yyN)
          else
            switch (yyErrorFlag) {
  
            case 0:
              yyExpectingState = yyState;
              // yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
//t              if (debug != null) debug.error("syntax error");
              if (yyToken == 0 /*eof*/ || yyToken == eof_token) throw new yyParser.yyUnexpectedEof ();
              goto case 1;
            case 1: case 2:
              yyErrorFlag = 3;
              do {
                if ((yyN = yySindex[yyStates[yyTop]]) != 0
                    && (yyN += Token.yyErrorCode) >= 0 && yyN < yyTable.Length
                    && yyCheck[yyN] == Token.yyErrorCode) {
//t                  if (debug != null)
//t                    debug.shift(yyStates[yyTop], yyTable[yyN], 3);
                  yyState = yyTable[yyN];
                  yyVal = yyLex.value();
                  goto continue_yyLoop;
                }
//t                if (debug != null) debug.pop(yyStates[yyTop]);
              } while (-- yyTop >= 0);
//t              if (debug != null) debug.reject();
              throw new yyParser.yyException("irrecoverable syntax error");
  
            case 3:
              if (yyToken == 0) {
//t                if (debug != null) debug.reject();
                throw new yyParser.yyException("irrecoverable syntax error at end-of-file");
              }
//t              if (debug != null)
//t                debug.discard(yyState, yyToken, yyname(yyToken),
//t  							yyLex.value());
              yyToken = -1;
              goto continue_yyDiscarded;		// leave stack alone
            }
        }
        int yyV = yyTop + 1-yyLen[yyN];
//t        if (debug != null)
//t          debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN), yyLen[yyN]);
        yyVal = yyV > yyTop ? null : yyVals[yyV]; // yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
        switch (yyN) {
case 1:
#line 385 "cs-parser.jay"
  {
		Lexer.check_incorrect_doc_comment ();
	  }
  break;
case 2:
#line 386 "cs-parser.jay"
  { Lexer.CompleteOnEOF = false; }
  break;
case 6:
  case_6();
  break;
case 7:
#line 405 "cs-parser.jay"
  {
		module.AddAttributes ((Attributes) yyVals[0+yyTop], current_namespace);
	  }
  break;
case 8:
  case_8();
  break;
case 13:
  case_13();
  break;
case 14:
#line 450 "cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
	  }
  break;
case 17:
  case_17();
  break;
case 18:
  case_18();
  break;
case 19:
  case_19();
  break;
case 20:
  case_20();
  break;
case 21:
  case_21();
  break;
case 22:
  case_22();
  break;
case 23:
  case_23();
  break;
case 24:
  case_24();
  break;
case 27:
  case_27();
  break;
case 28:
  case_28();
  break;
case 29:
  case_29();
  break;
case 30:
  case_30();
  break;
case 43:
  case_43();
  break;
case 44:
#line 635 "cs-parser.jay"
  {
		current_namespace.DeclarationFound = true;
	  }
  break;
case 45:
  case_45();
  break;
case 53:
  case_53();
  break;
case 54:
  case_54();
  break;
case 55:
  case_55();
  break;
case 56:
  case_56();
  break;
case 57:
  case_57();
  break;
case 58:
  case_58();
  break;
case 59:
  case_59();
  break;
case 60:
  case_60();
  break;
case 61:
#line 749 "cs-parser.jay"
  { yyVal = "event"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 62:
#line 750 "cs-parser.jay"
  { yyVal = "return"; savedCloseLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 63:
  case_63();
  break;
case 64:
#line 767 "cs-parser.jay"
  {
		yyVal = new List<Attribute> (4) { (Attribute) yyVals[0+yyTop] };
	  }
  break;
case 65:
  case_65();
  break;
case 66:
#line 782 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 67:
  case_67();
  break;
case 69:
#line 810 "cs-parser.jay"
  { yyVal = null; HadAttributeParens = false;  }
  break;
case 70:
  case_70();
  break;
case 71:
#line 822 "cs-parser.jay"
  { yyVal = null; }
  break;
case 72:
  case_72();
  break;
case 73:
  case_73();
  break;
case 74:
  case_74();
  break;
case 75:
  case_75();
  break;
case 76:
#line 866 "cs-parser.jay"
  {
	  	yyVal = new Argument ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 78:
#line 874 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 79:
  case_79();
  break;
case 80:
  case_80();
  break;
case 81:
#line 900 "cs-parser.jay"
  { yyVal = null; }
  break;
case 82:
#line 904 "cs-parser.jay"
  { 
		yyVal = Argument.AType.Ref;
	  }
  break;
case 83:
#line 908 "cs-parser.jay"
  { 
		yyVal = Argument.AType.Out;
	  }
  break;
case 86:
#line 920 "cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 87:
#line 924 "cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 99:
  case_99();
  break;
case 100:
#line 954 "cs-parser.jay"
  {
	  }
  break;
case 101:
  case_101();
  break;
case 102:
  case_102();
  break;
case 103:
  case_103();
  break;
case 104:
  case_104();
  break;
case 105:
  case_105();
  break;
case 106:
#line 998 "cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
	  }
  break;
case 107:
  case_107();
  break;
case 108:
  case_108();
  break;
case 109:
  case_109();
  break;
case 112:
#line 1047 "cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 113:
#line 1051 "cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 114:
  case_114();
  break;
case 115:
#line 1067 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 116:
  case_116();
  break;
case 117:
  case_117();
  break;
case 120:
  case_120();
  break;
case 121:
  case_121();
  break;
case 122:
  case_122();
  break;
case 123:
  case_123();
  break;
case 124:
#line 1146 "cs-parser.jay"
  {
		report.Error (1641, GetLocation (yyVals[-1+yyTop]), "A fixed size buffer field must have the array size specifier after the field name");
	  }
  break;
case 126:
  case_126();
  break;
case 127:
  case_127();
  break;
case 130:
#line 1176 "cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 131:
#line 1180 "cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 132:
  case_132();
  break;
case 133:
#line 1193 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 134:
  case_134();
  break;
case 137:
#line 1212 "cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 138:
#line 1216 "cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 139:
  case_139();
  break;
case 140:
#line 1232 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 141:
  case_141();
  break;
case 142:
  case_142();
  break;
case 145:
  case_145();
  break;
case 146:
  case_146();
  break;
case 147:
  case_147();
  break;
case 148:
#line 1300 "cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.All;
	  }
  break;
case 149:
  case_149();
  break;
case 150:
  case_150();
  break;
case 151:
#line 1339 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 152:
  case_152();
  break;
case 153:
#line 1349 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = true;
	  }
  break;
case 154:
  case_154();
  break;
case 155:
  case_155();
  break;
case 156:
  case_156();
  break;
case 158:
#line 1420 "cs-parser.jay"
  { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; }
  break;
case 159:
#line 1424 "cs-parser.jay"
  { yyVal = ParametersCompiled.EmptyReadOnlyParameters; }
  break;
case 161:
  case_161();
  break;
case 162:
  case_162();
  break;
case 163:
  case_163();
  break;
case 164:
  case_164();
  break;
case 165:
  case_165();
  break;
case 166:
  case_166();
  break;
case 167:
  case_167();
  break;
case 168:
#line 1496 "cs-parser.jay"
  {
		yyVal = new ParametersCompiled (new Parameter[] { (Parameter) yyVals[0+yyTop] } );
	  }
  break;
case 169:
#line 1500 "cs-parser.jay"
  {
		yyVal = new ParametersCompiled (new Parameter [] { new ArglistParameter (GetLocation (yyVals[0+yyTop])) }, true);
	  }
  break;
case 170:
  case_170();
  break;
case 171:
  case_171();
  break;
case 172:
  case_172();
  break;
case 173:
  case_173();
  break;
case 174:
  case_174();
  break;
case 175:
  case_175();
  break;
case 176:
  case_176();
  break;
case 177:
#line 1581 "cs-parser.jay"
  {
	  	++lexer.parsing_block;
	  }
  break;
case 178:
  case_178();
  break;
case 179:
#line 1622 "cs-parser.jay"
  { yyVal = Parameter.Modifier.NONE; }
  break;
case 181:
#line 1630 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 182:
  case_182();
  break;
case 183:
  case_183();
  break;
case 184:
  case_184();
  break;
case 185:
  case_185();
  break;
case 186:
  case_186();
  break;
case 187:
  case_187();
  break;
case 188:
  case_188();
  break;
case 189:
  case_189();
  break;
case 190:
  case_190();
  break;
case 191:
#line 1724 "cs-parser.jay"
  {
		Error_DuplicateParameterModifier (GetLocation (yyVals[-1+yyTop]), Parameter.Modifier.PARAMS);
	  }
  break;
case 192:
  case_192();
  break;
case 193:
  case_193();
  break;
case 194:
  case_194();
  break;
case 195:
  case_195();
  break;
case 196:
  case_196();
  break;
case 197:
#line 1778 "cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue;
	  }
  break;
case 198:
  case_198();
  break;
case 199:
#line 1807 "cs-parser.jay"
  {
		lexer.PropertyParsing = false;
	  }
  break;
case 200:
  case_200();
  break;
case 205:
  case_205();
  break;
case 206:
  case_206();
  break;
case 207:
  case_207();
  break;
case 208:
  case_208();
  break;
case 209:
  case_209();
  break;
case 211:
  case_211();
  break;
case 212:
  case_212();
  break;
case 213:
#line 1955 "cs-parser.jay"
  {
	  }
  break;
case 214:
  case_214();
  break;
case 215:
  case_215();
  break;
case 216:
  case_216();
  break;
case 217:
  case_217();
  break;
case 218:
#line 1995 "cs-parser.jay"
  {
		Error_SyntaxError (yyToken);	  
	  }
  break;
case 221:
#line 2007 "cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 222:
#line 2011 "cs-parser.jay"
  {
		lexer.parsing_modifiers = true;
	  }
  break;
case 223:
#line 2018 "cs-parser.jay"
  {
		report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
	  }
  break;
case 224:
#line 2022 "cs-parser.jay"
  {
		report.Error (525, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain fields or constants");
	  }
  break;
case 229:
#line 2030 "cs-parser.jay"
  {
	  	report.Error (567, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain operators");
	  }
  break;
case 230:
#line 2034 "cs-parser.jay"
  {
	  	report.Error (526, GetLocation (yyVals[0+yyTop]), "Interfaces cannot contain contructors");
	  }
  break;
case 231:
#line 2038 "cs-parser.jay"
  {
	  	report.Error (524, GetLocation (yyVals[0+yyTop]), "Interfaces cannot declare classes, structs, interfaces, delegates, or enumerations");
	  }
  break;
case 232:
#line 2044 "cs-parser.jay"
  {
	  }
  break;
case 233:
  case_233();
  break;
case 235:
#line 2077 "cs-parser.jay"
  { savedLocation = GetLocation (yyVals[0+yyTop]); yyVal = null; }
  break;
case 237:
  case_237();
  break;
case 238:
#line 2093 "cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.DefaultValue;
	  }
  break;
case 239:
  case_239();
  break;
case 241:
#line 2139 "cs-parser.jay"
  { yyVal = Operator.OpType.LogicalNot; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 242:
#line 2140 "cs-parser.jay"
  { yyVal = Operator.OpType.OnesComplement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 243:
#line 2141 "cs-parser.jay"
  { yyVal = Operator.OpType.Increment; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 244:
#line 2142 "cs-parser.jay"
  { yyVal = Operator.OpType.Decrement; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 245:
#line 2143 "cs-parser.jay"
  { yyVal = Operator.OpType.True; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 246:
#line 2144 "cs-parser.jay"
  { yyVal = Operator.OpType.False; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 247:
#line 2146 "cs-parser.jay"
  { yyVal = Operator.OpType.Addition; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 248:
#line 2147 "cs-parser.jay"
  { yyVal = Operator.OpType.Subtraction; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 249:
#line 2149 "cs-parser.jay"
  { yyVal = Operator.OpType.Multiply; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 250:
#line 2150 "cs-parser.jay"
  {  yyVal = Operator.OpType.Division; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 251:
#line 2151 "cs-parser.jay"
  { yyVal = Operator.OpType.Modulus; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 252:
#line 2152 "cs-parser.jay"
  { yyVal = Operator.OpType.BitwiseAnd; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 253:
#line 2153 "cs-parser.jay"
  { yyVal = Operator.OpType.BitwiseOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 254:
#line 2154 "cs-parser.jay"
  { yyVal = Operator.OpType.ExclusiveOr; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 255:
#line 2155 "cs-parser.jay"
  { yyVal = Operator.OpType.LeftShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 256:
#line 2156 "cs-parser.jay"
  { yyVal = Operator.OpType.RightShift; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 257:
#line 2157 "cs-parser.jay"
  { yyVal = Operator.OpType.Equality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 258:
#line 2158 "cs-parser.jay"
  { yyVal = Operator.OpType.Inequality; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 259:
#line 2159 "cs-parser.jay"
  { yyVal = Operator.OpType.GreaterThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 260:
#line 2160 "cs-parser.jay"
  { yyVal = Operator.OpType.LessThan; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 261:
#line 2161 "cs-parser.jay"
  { yyVal = Operator.OpType.GreaterThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 262:
#line 2162 "cs-parser.jay"
  { yyVal = Operator.OpType.LessThanOrEqual; savedOperatorLocation = GetLocation (yyVals[0+yyTop]); }
  break;
case 263:
#line 2169 "cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.DefaultValue;
	  }
  break;
case 264:
  case_264();
  break;
case 265:
#line 2192 "cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.DefaultValue;
	  }
  break;
case 266:
  case_266();
  break;
case 267:
  case_267();
  break;
case 268:
  case_268();
  break;
case 269:
  case_269();
  break;
case 270:
  case_270();
  break;
case 271:
  case_271();
  break;
case 272:
  case_272();
  break;
case 274:
#line 2302 "cs-parser.jay"
  { current_block = null; yyVal = null; }
  break;
case 277:
#line 2314 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 278:
  case_278();
  break;
case 279:
#line 2324 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 280:
  case_280();
  break;
case 281:
  case_281();
  break;
case 282:
  case_282();
  break;
case 283:
  case_283();
  break;
case 284:
  case_284();
  break;
case 285:
  case_285();
  break;
case 286:
  case_286();
  break;
case 287:
  case_287();
  break;
case 288:
  case_288();
  break;
case 289:
  case_289();
  break;
case 290:
  case_290();
  break;
case 292:
#line 2451 "cs-parser.jay"
  {
	  	++lexer.parsing_block;
	  }
  break;
case 293:
  case_293();
  break;
case 296:
#line 2469 "cs-parser.jay"
  {
		current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 297:
#line 2473 "cs-parser.jay"
  {
		current_event_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 298:
  case_298();
  break;
case 299:
#line 2486 "cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 300:
  case_300();
  break;
case 301:
  case_301();
  break;
case 302:
#line 2511 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 305:
  case_305();
  break;
case 306:
  case_306();
  break;
case 307:
  case_307();
  break;
case 308:
  case_308();
  break;
case 309:
  case_309();
  break;
case 310:
  case_310();
  break;
case 311:
  case_311();
  break;
case 312:
  case_312();
  break;
case 314:
  case_314();
  break;
case 315:
  case_315();
  break;
case 316:
  case_316();
  break;
case 317:
  case_317();
  break;
case 318:
  case_318();
  break;
case 320:
  case_320();
  break;
case 321:
  case_321();
  break;
case 324:
#line 2679 "cs-parser.jay"
  {
		lbag.AppendToMember (current_container, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 326:
  case_326();
  break;
case 327:
  case_327();
  break;
case 328:
  case_328();
  break;
case 329:
  case_329();
  break;
case 330:
  case_330();
  break;
case 332:
#line 2753 "cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue;
	  }
  break;
case 333:
  case_333();
  break;
case 334:
#line 2772 "cs-parser.jay"
  {
		lexer.ConstraintsParsing = false;
	  }
  break;
case 335:
  case_335();
  break;
case 337:
  case_337();
  break;
case 339:
  case_339();
  break;
case 341:
  case_341();
  break;
case 342:
  case_342();
  break;
case 344:
  case_344();
  break;
case 345:
  case_345();
  break;
case 346:
  case_346();
  break;
case 347:
  case_347();
  break;
case 348:
#line 2879 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 349:
  case_349();
  break;
case 350:
  case_350();
  break;
case 352:
  case_352();
  break;
case 353:
  case_353();
  break;
case 354:
  case_354();
  break;
case 355:
  case_355();
  break;
case 356:
  case_356();
  break;
case 357:
  case_357();
  break;
case 359:
  case_359();
  break;
case 360:
  case_360();
  break;
case 361:
  case_361();
  break;
case 362:
  case_362();
  break;
case 363:
  case_363();
  break;
case 365:
#line 3004 "cs-parser.jay"
  {
		yyVal = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 366:
#line 3011 "cs-parser.jay"
  {
		lexer.parsing_generic_declaration = true;
	  }
  break;
case 368:
  case_368();
  break;
case 370:
  case_370();
  break;
case 372:
  case_372();
  break;
case 374:
#line 3049 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 375:
  case_375();
  break;
case 376:
#line 3068 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((ATypeNameExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 377:
  case_377();
  break;
case 378:
#line 3077 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 379:
#line 3081 "cs-parser.jay"
  {
		yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 380:
  case_380();
  break;
case 381:
  case_381();
  break;
case 382:
  case_382();
  break;
case 383:
#line 3115 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Object, GetLocation (yyVals[0+yyTop])); }
  break;
case 384:
#line 3116 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.String, GetLocation (yyVals[0+yyTop])); }
  break;
case 385:
#line 3117 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Bool, GetLocation (yyVals[0+yyTop])); }
  break;
case 386:
#line 3118 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Decimal, GetLocation (yyVals[0+yyTop])); }
  break;
case 387:
#line 3119 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Float, GetLocation (yyVals[0+yyTop])); }
  break;
case 388:
#line 3120 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Double, GetLocation (yyVals[0+yyTop])); }
  break;
case 390:
#line 3125 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.SByte, GetLocation (yyVals[0+yyTop])); }
  break;
case 391:
#line 3126 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Byte, GetLocation (yyVals[0+yyTop])); }
  break;
case 392:
#line 3127 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Short, GetLocation (yyVals[0+yyTop])); }
  break;
case 393:
#line 3128 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.UShort, GetLocation (yyVals[0+yyTop])); }
  break;
case 394:
#line 3129 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Int, GetLocation (yyVals[0+yyTop])); }
  break;
case 395:
#line 3130 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.UInt, GetLocation (yyVals[0+yyTop])); }
  break;
case 396:
#line 3131 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Long, GetLocation (yyVals[0+yyTop])); }
  break;
case 397:
#line 3132 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.ULong, GetLocation (yyVals[0+yyTop])); }
  break;
case 398:
#line 3133 "cs-parser.jay"
  { yyVal = new TypeExpression (compiler.BuiltinTypes.Char, GetLocation (yyVals[0+yyTop])); }
  break;
case 419:
  case_419();
  break;
case 420:
  case_420();
  break;
case 424:
#line 3180 "cs-parser.jay"
  { yyVal = new NullLiteral (GetLocation (yyVals[0+yyTop])); }
  break;
case 425:
#line 3184 "cs-parser.jay"
  { yyVal = new BoolLiteral (compiler.BuiltinTypes, true, GetLocation (yyVals[0+yyTop])); }
  break;
case 426:
#line 3185 "cs-parser.jay"
  { yyVal = new BoolLiteral (compiler.BuiltinTypes, false, GetLocation (yyVals[0+yyTop])); }
  break;
case 431:
  case_431();
  break;
case 432:
#line 3218 "cs-parser.jay"
  {
		yyVal = new ParenthesizedExpression ((Expression) yyVals[-1+yyTop]);
	  }
  break;
case 433:
  case_433();
  break;
case 434:
  case_434();
  break;
case 435:
  case_435();
  break;
case 436:
  case_436();
  break;
case 437:
#line 3253 "cs-parser.jay"
  {
		yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null,GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 438:
  case_438();
  break;
case 439:
#line 3261 "cs-parser.jay"
  {
		yyVal = new CompletionMemberAccess ((Expression) yyVals[-2+yyTop], null, lexer.Location);
	  }
  break;
case 440:
  case_440();
  break;
case 441:
  case_441();
  break;
case 442:
  case_442();
  break;
case 443:
  case_443();
  break;
case 444:
#line 3291 "cs-parser.jay"
  { yyVal = null; }
  break;
case 446:
  case_446();
  break;
case 447:
  case_447();
  break;
case 448:
#line 3313 "cs-parser.jay"
  { yyVal = null; }
  break;
case 449:
#line 3317 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	}
  break;
case 450:
  case_450();
  break;
case 451:
  case_451();
  break;
case 452:
  case_452();
  break;
case 453:
  case_453();
  break;
case 454:
  case_454();
  break;
case 455:
#line 3356 "cs-parser.jay"
  {
		yyVal = new CompletionElementInitializer (null, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 456:
  case_456();
  break;
case 457:
  case_457();
  break;
case 458:
  case_458();
  break;
case 461:
#line 3387 "cs-parser.jay"
  { yyVal = null; }
  break;
case 463:
  case_463();
  break;
case 464:
  case_464();
  break;
case 465:
  case_465();
  break;
case 466:
  case_466();
  break;
case 467:
  case_467();
  break;
case 468:
#line 3441 "cs-parser.jay"
  {
		yyVal = new Argument ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 472:
  case_472();
  break;
case 473:
  case_473();
  break;
case 474:
  case_474();
  break;
case 475:
  case_475();
  break;
case 477:
  case_477();
  break;
case 478:
  case_478();
  break;
case 479:
  case_479();
  break;
case 480:
  case_480();
  break;
case 481:
  case_481();
  break;
case 482:
  case_482();
  break;
case 483:
  case_483();
  break;
case 484:
  case_484();
  break;
case 485:
#line 3538 "cs-parser.jay"
  {
	  	yyVal = new Argument ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 487:
#line 3546 "cs-parser.jay"
  {
		yyVal = new This (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 488:
  case_488();
  break;
case 489:
  case_489();
  break;
case 490:
#line 3566 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PostIncrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 491:
#line 3573 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PostDecrement, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 492:
  case_492();
  break;
case 493:
  case_493();
  break;
case 494:
  case_494();
  break;
case 495:
  case_495();
  break;
case 496:
  case_496();
  break;
case 497:
  case_497();
  break;
case 498:
  case_498();
  break;
case 499:
#line 3640 "cs-parser.jay"
  {
		++lexer.parsing_type;
	  }
  break;
case 500:
  case_500();
  break;
case 501:
  case_501();
  break;
case 504:
#line 3667 "cs-parser.jay"
  { yyVal = null; }
  break;
case 506:
  case_506();
  break;
case 507:
  case_507();
  break;
case 508:
  case_508();
  break;
case 509:
  case_509();
  break;
case 510:
  case_510();
  break;
case 511:
  case_511();
  break;
case 515:
  case_515();
  break;
case 516:
  case_516();
  break;
case 517:
  case_517();
  break;
case 518:
#line 3745 "cs-parser.jay"
  {
		yyVal = 2;
	  }
  break;
case 519:
#line 3749 "cs-parser.jay"
  {
		yyVal = ((int) yyVals[-1+yyTop]) + 1;
	  }
  break;
case 520:
#line 3756 "cs-parser.jay"
  {
		yyVal = null;
	  }
  break;
case 521:
#line 3760 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 522:
  case_522();
  break;
case 523:
  case_523();
  break;
case 524:
  case_524();
  break;
case 525:
  case_525();
  break;
case 526:
#line 3804 "cs-parser.jay"
  {
	  	lexer.TypeOfParsing = true;
	  }
  break;
case 527:
  case_527();
  break;
case 530:
  case_530();
  break;
case 531:
  case_531();
  break;
case 532:
  case_532();
  break;
case 533:
  case_533();
  break;
case 534:
  case_534();
  break;
case 535:
  case_535();
  break;
case 536:
  case_536();
  break;
case 537:
  case_537();
  break;
case 538:
  case_538();
  break;
case 539:
  case_539();
  break;
case 540:
  case_540();
  break;
case 541:
  case_541();
  break;
case 542:
  case_542();
  break;
case 543:
  case_543();
  break;
case 544:
  case_544();
  break;
case 545:
#line 3949 "cs-parser.jay"
  {
		start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], false, GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 546:
  case_546();
  break;
case 547:
#line 3962 "cs-parser.jay"
  {
		start_anonymous (false, (ParametersCompiled) yyVals[0+yyTop], true, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 548:
  case_548();
  break;
case 549:
#line 3979 "cs-parser.jay"
  {
		yyVal = ParametersCompiled.Undefined;
	  }
  break;
case 551:
#line 3987 "cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 552:
  case_552();
  break;
case 553:
  case_553();
  break;
case 555:
#line 4013 "cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.LogicalNot, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 556:
#line 4017 "cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.OnesComplement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 557:
  case_557();
  break;
case 558:
  case_558();
  break;
case 559:
  case_559();
  break;
case 560:
  case_560();
  break;
case 561:
  case_561();
  break;
case 562:
  case_562();
  break;
case 564:
#line 4078 "cs-parser.jay"
  { 
	  	yyVal = new Unary (Unary.Operator.UnaryPlus, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 565:
#line 4082 "cs-parser.jay"
  { 
		yyVal = new Unary (Unary.Operator.UnaryNegation, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 566:
#line 4086 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PreIncrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 567:
#line 4090 "cs-parser.jay"
  {
		yyVal = new UnaryMutator (UnaryMutator.Mode.PreDecrement, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 568:
#line 4094 "cs-parser.jay"
  {
		yyVal = new Indirection ((Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 569:
#line 4098 "cs-parser.jay"
  {
		yyVal = new Unary (Unary.Operator.AddressOf, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 570:
  case_570();
  break;
case 571:
  case_571();
  break;
case 572:
  case_572();
  break;
case 573:
  case_573();
  break;
case 574:
  case_574();
  break;
case 575:
  case_575();
  break;
case 577:
  case_577();
  break;
case 578:
  case_578();
  break;
case 579:
  case_579();
  break;
case 580:
  case_580();
  break;
case 581:
  case_581();
  break;
case 582:
  case_582();
  break;
case 584:
  case_584();
  break;
case 585:
  case_585();
  break;
case 586:
#line 4192 "cs-parser.jay"
  {
		yyVal = new As ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 587:
#line 4196 "cs-parser.jay"
  {
		yyVal = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 588:
  case_588();
  break;
case 589:
  case_589();
  break;
case 590:
  case_590();
  break;
case 591:
  case_591();
  break;
case 593:
  case_593();
  break;
case 594:
  case_594();
  break;
case 595:
  case_595();
  break;
case 596:
  case_596();
  break;
case 598:
  case_598();
  break;
case 599:
  case_599();
  break;
case 600:
  case_600();
  break;
case 601:
  case_601();
  break;
case 602:
  case_602();
  break;
case 603:
  case_603();
  break;
case 604:
  case_604();
  break;
case 605:
  case_605();
  break;
case 607:
  case_607();
  break;
case 608:
  case_608();
  break;
case 609:
  case_609();
  break;
case 610:
  case_610();
  break;
case 612:
  case_612();
  break;
case 613:
  case_613();
  break;
case 615:
  case_615();
  break;
case 616:
  case_616();
  break;
case 618:
  case_618();
  break;
case 619:
  case_619();
  break;
case 621:
  case_621();
  break;
case 622:
  case_622();
  break;
case 624:
  case_624();
  break;
case 625:
  case_625();
  break;
case 627:
  case_627();
  break;
case 629:
  case_629();
  break;
case 630:
  case_630();
  break;
case 631:
  case_631();
  break;
case 632:
  case_632();
  break;
case 633:
  case_633();
  break;
case 634:
  case_634();
  break;
case 635:
  case_635();
  break;
case 636:
  case_636();
  break;
case 637:
  case_637();
  break;
case 638:
  case_638();
  break;
case 639:
  case_639();
  break;
case 640:
  case_640();
  break;
case 641:
  case_641();
  break;
case 642:
  case_642();
  break;
case 643:
  case_643();
  break;
case 644:
  case_644();
  break;
case 645:
  case_645();
  break;
case 646:
  case_646();
  break;
case 647:
  case_647();
  break;
case 648:
  case_648();
  break;
case 649:
#line 4554 "cs-parser.jay"
  { yyVal = ParametersCompiled.EmptyReadOnlyParameters; }
  break;
case 650:
  case_650();
  break;
case 651:
#line 4565 "cs-parser.jay"
  {
		start_block (Location.Null);
	  }
  break;
case 652:
  case_652();
  break;
case 654:
  case_654();
  break;
case 656:
  case_656();
  break;
case 657:
  case_657();
  break;
case 658:
  case_658();
  break;
case 659:
  case_659();
  break;
case 660:
  case_660();
  break;
case 661:
  case_661();
  break;
case 662:
  case_662();
  break;
case 663:
#line 4632 "cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 664:
  case_664();
  break;
case 665:
  case_665();
  break;
case 666:
#line 4646 "cs-parser.jay"
  {
	  	valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;	  
	  }
  break;
case 667:
  case_667();
  break;
case 668:
  case_668();
  break;
case 674:
#line 4671 "cs-parser.jay"
  {
		yyVal = new ArglistAccess (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 675:
  case_675();
  break;
case 676:
  case_676();
  break;
case 677:
  case_677();
  break;
case 679:
#line 4700 "cs-parser.jay"
  {
		yyVal = new BooleanExpression ((Expression) yyVals[0+yyTop]);
	  }
  break;
case 680:
#line 4712 "cs-parser.jay"
  {
	  }
  break;
case 681:
  case_681();
  break;
case 682:
  case_682();
  break;
case 683:
  case_683();
  break;
case 684:
  case_684();
  break;
case 685:
#line 4759 "cs-parser.jay"
  { yyVal = null; }
  break;
case 686:
#line 4761 "cs-parser.jay"
  { yyVal = yyVals[0+yyTop]; StoreModifierLocation (Modifiers.PARTIAL, GetLocation (yyVals[0+yyTop])); }
  break;
case 687:
  case_687();
  break;
case 688:
#line 4774 "cs-parser.jay"
  {
		lexer.parsing_modifiers = false;		
	  }
  break;
case 690:
  case_690();
  break;
case 691:
  case_691();
  break;
case 692:
  case_692();
  break;
case 693:
  case_693();
  break;
case 694:
  case_694();
  break;
case 695:
  case_695();
  break;
case 696:
  case_696();
  break;
case 697:
  case_697();
  break;
case 698:
  case_698();
  break;
case 699:
  case_699();
  break;
case 700:
  case_700();
  break;
case 701:
  case_701();
  break;
case 702:
  case_702();
  break;
case 703:
  case_703();
  break;
case 704:
  case_704();
  break;
case 705:
  case_705();
  break;
case 707:
  case_707();
  break;
case 708:
  case_708();
  break;
case 710:
#line 4900 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 711:
  case_711();
  break;
case 712:
  case_712();
  break;
case 713:
  case_713();
  break;
case 714:
  case_714();
  break;
case 715:
  case_715();
  break;
case 716:
  case_716();
  break;
case 717:
  case_717();
  break;
case 718:
  case_718();
  break;
case 719:
#line 4993 "cs-parser.jay"
  {
		yyVal = new SpecialContraintExpr (SpecialConstraint.Class, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 720:
#line 4997 "cs-parser.jay"
  {
		yyVal = new SpecialContraintExpr (SpecialConstraint.Struct, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 721:
#line 5004 "cs-parser.jay"
  {
		yyVal = Variance.None;
	  }
  break;
case 722:
  case_722();
  break;
case 723:
  case_723();
  break;
case 724:
  case_724();
  break;
case 725:
  case_725();
  break;
case 726:
#line 5049 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 727:
  case_727();
  break;
case 728:
  case_728();
  break;
case 729:
  case_729();
  break;
case 730:
  case_730();
  break;
case 731:
  case_731();
  break;
case 732:
  case_732();
  break;
case 733:
  case_733();
  break;
case 738:
#line 5111 "cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 739:
#line 5115 "cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 741:
  case_741();
  break;
case 742:
  case_742();
  break;
case 745:
#line 5149 "cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 746:
#line 5153 "cs-parser.jay"
  {
		current_block.AddStatement ((Statement) yyVals[0+yyTop]);
	  }
  break;
case 775:
  case_775();
  break;
case 776:
  case_776();
  break;
case 777:
  case_777();
  break;
case 778:
  case_778();
  break;
case 779:
  case_779();
  break;
case 782:
  case_782();
  break;
case 783:
  case_783();
  break;
case 784:
  case_784();
  break;
case 785:
  case_785();
  break;
case 786:
#line 5297 "cs-parser.jay"
  {
		yyVal = new ComposedCast ((FullNamedExpression) yyVals[-1+yyTop], (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 787:
#line 5301 "cs-parser.jay"
  {
		yyVal = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation (yyVals[-1+yyTop])), (ComposedTypeSpecifier) yyVals[0+yyTop]);
	  }
  break;
case 788:
  case_788();
  break;
case 790:
  case_790();
  break;
case 791:
#line 5322 "cs-parser.jay"
  {
		yyVal = ComposedTypeSpecifier.CreatePointer (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 793:
#line 5330 "cs-parser.jay"
  {
	  	yyVal = Error_AwaitAsIdentifier (yyVals[0+yyTop]);
	  }
  break;
case 794:
  case_794();
  break;
case 795:
  case_795();
  break;
case 796:
  case_796();
  break;
case 797:
  case_797();
  break;
case 799:
  case_799();
  break;
case 801:
  case_801();
  break;
case 802:
  case_802();
  break;
case 803:
  case_803();
  break;
case 807:
  case_807();
  break;
case 810:
  case_810();
  break;
case 811:
  case_811();
  break;
case 812:
#line 5454 "cs-parser.jay"
  {
		report.Error (145, lexer.Location, "A const field requires a value to be provided");
	  }
  break;
case 813:
  case_813();
  break;
case 818:
  case_818();
  break;
case 820:
  case_820();
  break;
case 821:
  case_821();
  break;
case 822:
  case_822();
  break;
case 823:
#line 5504 "cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 824:
  case_824();
  break;
case 825:
#line 5514 "cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 826:
#line 5515 "cs-parser.jay"
  { yyVal = yyVals[-1+yyTop]; }
  break;
case 827:
  case_827();
  break;
case 828:
  case_828();
  break;
case 829:
  case_829();
  break;
case 832:
  case_832();
  break;
case 833:
  case_833();
  break;
case 834:
  case_834();
  break;
case 835:
#line 5591 "cs-parser.jay"
  {
		start_block (GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 836:
  case_836();
  break;
case 837:
  case_837();
  break;
case 838:
  case_838();
  break;
case 840:
  case_840();
  break;
case 841:
  case_841();
  break;
case 842:
  case_842();
  break;
case 843:
#line 5642 "cs-parser.jay"
  {
		current_block = current_block.CreateSwitchBlock (lexer.Location);
	  }
  break;
case 844:
#line 5646 "cs-parser.jay"
  {
		yyVal = new SwitchSection ((List<SwitchLabel>) yyVals[-2+yyTop], current_block);
	  }
  break;
case 845:
  case_845();
  break;
case 846:
  case_846();
  break;
case 847:
  case_847();
  break;
case 848:
  case_848();
  break;
case 849:
#line 5680 "cs-parser.jay"
  {
		yyVal = new SwitchLabel (null, GetLocation (yyVals[0+yyTop]));
	  }
  break;
case 854:
  case_854();
  break;
case 855:
  case_855();
  break;
case 856:
  case_856();
  break;
case 857:
  case_857();
  break;
case 858:
  case_858();
  break;
case 859:
  case_859();
  break;
case 860:
#line 5741 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 861:
  case_861();
  break;
case 862:
#line 5756 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 863:
  case_863();
  break;
case 864:
  case_864();
  break;
case 865:
#line 5777 "cs-parser.jay"
  {
		yyVal = yyVals[0+yyTop];
	  }
  break;
case 866:
  case_866();
  break;
case 867:
  case_867();
  break;
case 868:
  case_868();
  break;
case 869:
#line 5811 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 871:
  case_871();
  break;
case 872:
  case_872();
  break;
case 874:
#line 5832 "cs-parser.jay"
  { yyVal = null; }
  break;
case 876:
#line 5837 "cs-parser.jay"
  { yyVal = new EmptyStatement (lexer.Location); }
  break;
case 880:
  case_880();
  break;
case 881:
  case_881();
  break;
case 882:
  case_882();
  break;
case 883:
  case_883();
  break;
case 884:
  case_884();
  break;
case 885:
  case_885();
  break;
case 886:
  case_886();
  break;
case 893:
  case_893();
  break;
case 894:
  case_894();
  break;
case 895:
  case_895();
  break;
case 896:
  case_896();
  break;
case 897:
  case_897();
  break;
case 898:
  case_898();
  break;
case 899:
  case_899();
  break;
case 900:
  case_900();
  break;
case 901:
  case_901();
  break;
case 902:
  case_902();
  break;
case 903:
  case_903();
  break;
case 904:
  case_904();
  break;
case 905:
  case_905();
  break;
case 906:
  case_906();
  break;
case 909:
#line 6077 "cs-parser.jay"
  {
		yyVal = new TryCatch ((Block) yyVals[-1+yyTop], (List<Catch>) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]), false);
	  }
  break;
case 910:
  case_910();
  break;
case 911:
  case_911();
  break;
case 912:
  case_912();
  break;
case 913:
  case_913();
  break;
case 914:
  case_914();
  break;
case 917:
#line 6126 "cs-parser.jay"
  {
		yyVal = new Catch ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 918:
  case_918();
  break;
case 919:
#line 6145 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 920:
  case_920();
  break;
case 921:
  case_921();
  break;
case 922:
#line 6186 "cs-parser.jay"
  {
		yyVal = new Checked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 923:
#line 6193 "cs-parser.jay"
  {
		yyVal = new Unchecked ((Block) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
  break;
case 924:
  case_924();
  break;
case 925:
#line 6203 "cs-parser.jay"
  {
		yyVal = new Unsafe ((Block) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 926:
  case_926();
  break;
case 927:
  case_927();
  break;
case 928:
  case_928();
  break;
case 929:
  case_929();
  break;
case 930:
  case_930();
  break;
case 931:
  case_931();
  break;
case 932:
  case_932();
  break;
case 933:
  case_933();
  break;
case 934:
  case_934();
  break;
case 935:
  case_935();
  break;
case 937:
  case_937();
  break;
case 938:
#line 6308 "cs-parser.jay"
  {
		Error_MissingInitializer (lexer.Location);
	  }
  break;
case 939:
  case_939();
  break;
case 940:
  case_940();
  break;
case 941:
  case_941();
  break;
case 942:
  case_942();
  break;
case 943:
  case_943();
  break;
case 944:
  case_944();
  break;
case 945:
  case_945();
  break;
case 946:
  case_946();
  break;
case 947:
  case_947();
  break;
case 948:
#line 6413 "cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 949:
  case_949();
  break;
case 950:
#line 6429 "cs-parser.jay"
  {
		current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 951:
  case_951();
  break;
case 952:
  case_952();
  break;
case 953:
  case_953();
  break;
case 955:
  case_955();
  break;
case 956:
  case_956();
  break;
case 957:
#line 6493 "cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 958:
  case_958();
  break;
case 959:
  case_959();
  break;
case 960:
  case_960();
  break;
case 961:
  case_961();
  break;
case 963:
  case_963();
  break;
case 969:
#line 6547 "cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 970:
  case_970();
  break;
case 971:
#line 6566 "cs-parser.jay"
  {
	  	current_block = new Linq.QueryBlock (current_block, lexer.Location);
	  }
  break;
case 972:
  case_972();
  break;
case 973:
  case_973();
  break;
case 974:
  case_974();
  break;
case 975:
  case_975();
  break;
case 976:
  case_976();
  break;
case 977:
  case_977();
  break;
case 978:
  case_978();
  break;
case 979:
  case_979();
  break;
case 980:
  case_980();
  break;
case 982:
  case_982();
  break;
case 983:
  case_983();
  break;
case 984:
  case_984();
  break;
case 986:
  case_986();
  break;
case 987:
  case_987();
  break;
case 989:
  case_989();
  break;
case 990:
  case_990();
  break;
case 991:
#line 6767 "cs-parser.jay"
  {
		yyVal = new Linq.OrderByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]);	
	  }
  break;
case 992:
  case_992();
  break;
case 993:
  case_993();
  break;
case 994:
#line 6784 "cs-parser.jay"
  {
		yyVal = new Linq.ThenByAscending ((Linq.QueryBlock) current_block, (Expression)yyVals[0+yyTop]);	
	  }
  break;
case 995:
  case_995();
  break;
case 996:
  case_996();
  break;
case 998:
  case_998();
  break;
case 999:
  case_999();
  break;
case 1002:
  case_1002();
  break;
case 1003:
  case_1003();
  break;
case 1011:
#line 6906 "cs-parser.jay"
  {
		module.DocumentationBuilder.ParsedName = (MemberName) yyVals[0+yyTop];
	  }
  break;
case 1012:
#line 6913 "cs-parser.jay"
  {
		module.DocumentationBuilder.ParsedParameters = (List<DocumentationParameter>)yyVals[0+yyTop];
	  }
  break;
case 1013:
  case_1013();
  break;
case 1014:
  case_1014();
  break;
case 1015:
#line 6930 "cs-parser.jay"
  {
		yyVal = new MemberName ((MemberName) yyVals[-2+yyTop], MemberCache.IndexerNameAlias, Location.Null);
	  }
  break;
case 1016:
#line 6934 "cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 1017:
  case_1017();
  break;
case 1018:
  case_1018();
  break;
case 1019:
  case_1019();
  break;
case 1020:
  case_1020();
  break;
case 1022:
#line 6970 "cs-parser.jay"
  {
		yyVal = new MemberName (((MemberName) yyVals[-2+yyTop]), (MemberName) yyVals[0+yyTop]);
	  }
  break;
case 1024:
#line 6978 "cs-parser.jay"
  {
		valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out;
	  }
  break;
case 1025:
#line 6982 "cs-parser.jay"
  {
		yyVal = yyVals[-1+yyTop];
	  }
  break;
case 1026:
#line 6989 "cs-parser.jay"
  {
		yyVal = new List<DocumentationParameter> (0);
	  }
  break;
case 1028:
  case_1028();
  break;
case 1029:
  case_1029();
  break;
case 1030:
  case_1030();
  break;
#line default
        }
        yyTop -= yyLen[yyN];
        yyState = yyStates[yyTop];
        int yyM = yyLhs[yyN];
        if (yyState == 0 && yyM == 0) {
//t          if (debug != null) debug.shift(0, yyFinal);
          yyState = yyFinal;
          if (yyToken < 0) {
            yyToken = yyLex.advance() ? yyLex.token() : 0;
//t            if (debug != null)
//t               debug.lex(yyState, yyToken,yyname(yyToken), yyLex.value());
          }
          if (yyToken == 0) {
//t            if (debug != null) debug.accept(yyVal);
            return yyVal;
          }
          goto continue_yyLoop;
        }
        if (((yyN = yyGindex[yyM]) != 0) && ((yyN += yyState) >= 0)
            && (yyN < yyTable.Length) && (yyCheck[yyN] == yyState))
          yyState = yyTable[yyN];
        else
          yyState = yyDgoto[yyM];
//t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
	 goto continue_yyLoop;
      continue_yyDiscarded: ;	// implements the named-loop continue: 'continue yyDiscarded'
      }
    continue_yyLoop: ;		// implements the named-loop continue: 'continue yyLoop'
    }
  }
Beispiel #9
0
void case_634()
#line 4571 "cs-parser.jay"
{
		var is_expr = new Is ((Expression) yyVals[-2+yyTop], (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
		if (lang_version != LanguageVersion.Experimental)
			FeatureIsNotAvailable (GetLocation (yyVals[-1+yyTop]), "pattern matching");

		yyVal = is_expr;
	  }
        public async Task TimeoutsAreNotReturnedUntilTheyAreActuallyDue()
        {
            var theFuture = DateTimeOffset.Now.AddMinutes(1);
            var evenFurtherIntoTheFuture = DateTimeOffset.Now.AddMinutes(8);

            await _timeoutManager.Defer(theFuture, HeadersWith("i know u"), EmptyBody());

            await _timeoutManager.Defer(evenFurtherIntoTheFuture, HeadersWith("i know u too"), EmptyBody());

            using (var result = await _timeoutManager.GetDueMessages())
            {
                var dueTimeoutsNow = result.ToList();

                Assert.That(dueTimeoutsNow.Count, Is.EqualTo(0));
            }

            RebusTimeMachine.FakeIt(theFuture);

            using (var result = await _timeoutManager.GetDueMessages())
            {
                var dueTimeoutsInTheFuture = result.ToList();
                Assert.That(dueTimeoutsInTheFuture.Count, Is.EqualTo(1));
                Assert.That(dueTimeoutsInTheFuture[0].Headers[Headers.MessageId], Is.EqualTo("i know u"));

                dueTimeoutsInTheFuture[0].MarkAsCompleted();
            }

            RebusTimeMachine.FakeIt(evenFurtherIntoTheFuture);

            using (var result = await _timeoutManager.GetDueMessages())
            {
                var dueTimeoutsFurtherIntoInTheFuture = result.ToList();
                Assert.That(dueTimeoutsFurtherIntoInTheFuture.Count, Is.EqualTo(1));
                Assert.That(dueTimeoutsFurtherIntoInTheFuture[0].Headers[Headers.MessageId], Is.EqualTo("i know u too"));

                dueTimeoutsFurtherIntoInTheFuture[0].MarkAsCompleted();
            }
        }
 public static void IsBlittableTest()
 {
     Assert.That(Marshal.SizeOf <WS_CHANNEL_PROPERTIES>(), Is.EqualTo(sizeof(WS_CHANNEL_PROPERTIES)));
 }
 public static void IsBlittableTest()
 {
     Assert.That(Marshal.SizeOf<ICompositionGraphicsDeviceInterop>(), Is.EqualTo(sizeof(ICompositionGraphicsDeviceInterop)));
 }
 public static void GuidOfTest()
 {
     Assert.That(typeof(ICompositionGraphicsDeviceInterop).GUID, Is.EqualTo(IID_ICompositionGraphicsDeviceInterop));
 }
 public void ConstructWithScopeArgument(ParallelScope scope)
 {
     var attr = new ParallelizableAttribute(scope);
     Assert.That(attr.Properties.Get(PropertyNames.ParallelScope), Is.EqualTo(scope));
 }
Beispiel #15
0
        public static AssertResult That(Shelisp.Object @this, Is @is, string description = null)
        {
            switch (@is) {
            case Is.Nil:
                if (L.NILP(@this)) return Succeed (description);
                break;
            case Is.T:
                if (!L.NILP(@this)) return Succeed (description);
                break;
            case Is.Listp:
                if (@this is Shelisp.List) return Succeed (description);
                break;
            case Is.Stringp:
                if (@this is Shelisp.String) return Succeed (description);
                break;
            case Is.Numberp:
                if (@this is Number) return Succeed (description);
                break;
            case Is.Integerp:
                if (Number.IsInt(@this)) return Succeed (description);
                break;
            case Is.Floatp:
                if (Number.IsFloat(@this)) return Succeed (description);
                break;
            case Is.Symbolp:
                if (@this is Symbol) return Succeed (description);
                break;
            case Is.Vectorp:
                if (@this is Vector) return Succeed (description);
                break;
            case Is.Arrayp:
                if (@this is Shelisp.Array) return Succeed (description);
                break;
            case Is.Sequencep:
                if (@this is Sequence) return Succeed (description);
                break;
            default:
                return Fail ("unhandled Is value.");
            }

            return Fail (description);
        }
Beispiel #16
0
 public static void GuidOfTest()
 {
     Assert.That(typeof(HomeGroup).GUID, Is.EqualTo(IID_HomeGroup));
 }
Beispiel #17
0
		public virtual object Visit (Is isExpression)
		{
			return null;
		}
Beispiel #18
0
        public void DbContextMock_CreateDbSetMock_AddMultipleModelsWithLongAsDatabaseGeneratedIdentityKey_ShouldGenerateIncrementalKey()
        {
            // Arrange
            var dbContextMock = new DbContextMock <TestDbContext>("abc");
            var dbSetMock     = dbContextMock.CreateDbSetMock(x => x.IntKeyModels);

            // Act
            dbContextMock.Object.IntKeyModels.Add(new IntKeyModel {
                Url = "A"
            });
            dbContextMock.Object.IntKeyModels.Add(new IntKeyModel {
                Url = "B"
            });
            dbContextMock.Object.IntKeyModels.Add(new IntKeyModel {
                Url = "C"
            });
            dbContextMock.Object.SaveChanges();

            // Assert
            Assert.That(dbSetMock.Object.First(x => x.Url == "A").LoggingRepositoryId, Is.EqualTo(1));
            Assert.That(dbSetMock.Object.First(x => x.Url == "B").LoggingRepositoryId, Is.EqualTo(2));
            Assert.That(dbSetMock.Object.First(x => x.Url == "C").LoggingRepositoryId, Is.EqualTo(3));
        }
Beispiel #19
0
void case_637()
#line 4591 "cs-parser.jay"
{
		var lt = (LocatedToken) yyVals[-2+yyTop];
		yyVal = new Is (new SimpleName (lt.Value, lt.Location), (Expression) yyVals[0+yyTop], GetLocation (yyVals[-1+yyTop]));
	  }
Beispiel #20
0
        public async Task DbContextMock_Constructor_ShouldSetupSaveChanges()
        {
            var dbContextMock = new DbContextMock <TestDbContext>("abc");

            dbContextMock.RegisterDbSetMock(x => x.Users, new TestDbSetMock());
            Assert.That(dbContextMock.Object.SaveChanges(), Is.EqualTo(55861));
            Assert.That(await dbContextMock.Object.SaveChangesAsync(), Is.EqualTo(55861));
            Assert.That(await dbContextMock.Object.SaveChangesAsync(CancellationToken.None), Is.EqualTo(55861));
        }
 public void Document_FirstChildIsXmlDeclaration()
 {
     Assume.That(doc.FirstChild != null);
     Assert.That(doc.FirstChild.NodeType, Is.EqualTo(XmlNodeType.XmlDeclaration));
     Assert.That(doc.FirstChild.Name, Is.EqualTo("xml"));
 }
Beispiel #22
0
        public void Test_SliceComparer_Compare()
        {
            var cmp = Slice.Comparer.Default;

            Assert.That(cmp, Is.Not.Null);

            Assert.That(cmp.Compare(Slice.Nil, Slice.Nil), Is.Zero);
            Assert.That(cmp.Compare(Slice.Empty, Slice.Empty), Is.Zero);
            Assert.That(cmp.Compare(Slice.FromByte(42), Slice.FromByte(42)), Is.Zero);

            //REVIEW: Inconsistency: compare(nil, empty) == 0, but Equals(nil, empty) == false
            Assert.That(cmp.Compare(Slice.Nil, Slice.Empty), Is.Zero, "Nil and Empty are considered similar regarding ordering");
            Assert.That(cmp.Compare(Slice.Empty, Slice.Nil), Is.Zero, "Nil and Empty are considered similar regarding ordering");

            Assert.That(cmp.Compare(Slice.FromByte(42), Slice.FromByte(77)), Is.LessThan(0));
            Assert.That(cmp.Compare(Slice.FromByte(42), Slice.FromByte(21)), Is.GreaterThan(0));
            Assert.That(cmp.Compare(Slice.FromByte(42), Slice.Empty), Is.GreaterThan(0));
            Assert.That(cmp.Compare(Slice.FromByte(42), Slice.Nil), Is.GreaterThan(0));

            Assert.That(cmp.Compare(Slice.FromString("hello"), Slice.FromString("world")), Is.LessThan(0));
            Assert.That(cmp.Compare(Slice.FromString("world"), Slice.FromString("hello")), Is.GreaterThan(0));

            Assert.That(cmp.Compare(Slice.FromString("hell"), Slice.FromString("hello")), Is.LessThan(0));
            Assert.That(cmp.Compare(Slice.FromString("help"), Slice.FromString("hello")), Is.GreaterThan(0));
        }
 public void Document_ThirdChildIsTestResults()
 {
     Assume.That(doc.ChildNodes.Count >= 3);
     Assert.That(doc.ChildNodes[2].Name, Is.EqualTo("test-results"));
 }
Beispiel #24
0
 public static void GuidOfTest()
 {
     Assert.That(typeof(IDxcVersionInfo).GUID, Is.EqualTo(IID_IDxcVersionInfo));
 }
 public void TestResults_AssemblyPathIsCorrect()
 {
     Assert.That(RequiredAttribute(topNode, "name"), Is.EqualTo("NUnit.Tests.Assemblies.MockTestFixture"));
 }
Beispiel #26
0
 public static void IsBlittableTest()
 {
     Assert.That(Marshal.SizeOf <IDxcVersionInfo>(), Is.EqualTo(sizeof(IDxcVersionInfo)));
 }
Beispiel #27
0
        public void GuessZoneIdByTransitionsUncached(TimeZoneInfo bclZone)
        {
            // As of May 4th 2018, the Windows time zone database on Jon's laptop has caught up with this,
            // but the one on AppVeyor hasn't. Keep skipping it for now.
            if (bclZone.Id == "Namibia Standard Time")
            {
                return;
            }

            // As of May 4th 2018, the Windows time zone database hasn't caught up
            // with the North Korea change in TZDB 2018e.
            if (bclZone.Id == "North Korea Standard Time")
            {
                return;
            }

            string id = TzdbDateTimeZoneSource.Default.GuessZoneIdByTransitionsUncached(bclZone,
                TzdbDefaultZonesForIdGuessZoneIdByTransitionsUncached);

            // Unmappable zones may not be mapped, or may be mapped to something reasonably accurate.
            // We don't mind either way.
            if (!TzdbDateTimeZoneSource.Default.WindowsMapping.PrimaryMapping.ContainsKey(bclZone.Id))
            {
                return;
            }

            Assert.IsNotNull(id, $"Unable to guess time zone for {bclZone.Id}");
            var tzdbZone = TzdbDateTimeZoneSource.Default.ForId(id);

            var thisYear = SystemClock.Instance.GetCurrentInstant().InUtc().Year;
            LocalDate? lastIncorrectDate = null;
            Offset? lastIncorrectBclOffset = null;
            Offset? lastIncorrectTzdbOffset = null;

            int total = 0;
            int correct = 0;
            // From the start of this year to the end of next year, we should have an 80% hit rate or better.
            // That's stronger than the 70% we limit to in the code, because if it starts going between 70% and 80% we
            // should have another look at the algorithm. (And this is dealing with 80% of days, not 80% of transitions,
            // so it's not quite equivalent anyway.)
            for (var date = new LocalDate(thisYear, 1, 1); date.Year < thisYear + 2; date = date.PlusDays(1))
            {
                Instant startOfUtcDay = date.AtMidnight().InUtc().ToInstant();
                Offset tzdbOffset = tzdbZone.GetUtcOffset(startOfUtcDay);
                Offset bclOffset = Offset.FromTimeSpan(bclZone.GetUtcOffset(startOfUtcDay.ToDateTimeOffset()));
                if (tzdbOffset == bclOffset)
                {
                    correct++;
                }
                else
                {
                    // Useful for debugging (by having somewhere to put a breakpoint) as well as for the message.
                    lastIncorrectDate = date;
                    lastIncorrectBclOffset = bclOffset;
                    lastIncorrectTzdbOffset = tzdbOffset;
                }
                total++;
            }
            Assert.That(correct * 100.0 / total, Is.GreaterThanOrEqualTo(75.0),
                "Last incorrect date for {0} vs {1}: {2} (BCL: {3}; TZDB: {4})",
                bclZone.Id,
                id,
                lastIncorrectDate, lastIncorrectBclOffset, lastIncorrectTzdbOffset);
        }
Beispiel #28
0
        public void NoTypesAreAvailableByDefault()
        {
            var types = _container.Resolve <IContentDefinitionManager>().ListTypeDefinitions();

            Assert.That(types.Count(), Is.EqualTo(0));
        }
            public void Should_set_title_of_feature()
            {
                var storyNodes = xmlOut.SelectSingleNode("//feature").Attributes["name"];

                Assert.That(storyNodes.Value, Is.EqualTo(FeatureTitle));
            }
Beispiel #30
0
        public void LocalHostShouldBeReplacedWithDot()
        {
            var path = InstancePathConversion.GetInstsPath("LOCALHOST", "SQLEXPRESS");

            Assert.That(path, Is.EqualTo(@".\SQLEXPRESS"));
        }
Beispiel #31
0
        public void Keyboard()
        {
            State numLockOff      = new State("NumLockOff");
            State numLockOn       = new State("NumLockOn");
            var   _numlockMachine = new StateMachine(
                numLockOff.AddHandler("numlock", numLockOn),
                numLockOn.AddHandler("numlock", numLockOff)
                );
            State capsLockOff      = new State("CapsLockOff");
            State capsLockOn       = new State("CapsLockOn");
            var   _capslockMachine = new StateMachine(
                capsLockOff.AddHandler("capslock", capsLockOn),
                capsLockOn.AddHandler("capslock", capsLockOff)
                );

            State    keyBoardOff = new State("KeyboardOff");
            Parallel keyBoardOn  = new Parallel("KeyboardOn", new[] {
                _capslockMachine,
                _numlockMachine
            }).AddHandler("unplug", keyBoardOff);

            var sm = new StateMachine(
                keyBoardOff.AddHandler("plug", keyBoardOn),
                keyBoardOn
                );

            sm.setup();

            Expect(sm.currentState.id, Is.EqualTo("KeyboardOff"));
            sm.handleEvent("plug");
            Expect(sm.currentState.id, Is.EqualTo("KeyboardOn"));
            Expect(_capslockMachine.currentState.id, Is.EqualTo("CapsLockOff"));
            Expect(_numlockMachine.currentState.id, Is.EqualTo("NumLockOff"));

            // check capslock toggle
            sm.handleEvent("capslock");
            Expect(_capslockMachine.currentState.id, Is.EqualTo("CapsLockOn"));
            Expect(_numlockMachine.currentState.id, Is.EqualTo("NumLockOff"));

            sm.handleEvent("capslock");
            Expect(_capslockMachine.currentState.id, Is.EqualTo("CapsLockOff"));
            Expect(_numlockMachine.currentState.id, Is.EqualTo("NumLockOff"));

            // check numlock toggle
            sm.handleEvent("numlock");
            Expect(_capslockMachine.currentState.id, Is.EqualTo("CapsLockOff"));
            Expect(_numlockMachine.currentState.id, Is.EqualTo("NumLockOn"));

            // now unplug keyboard
            sm.handleEvent("unplug");
            Expect(sm.currentState.id, Is.EqualTo("KeyboardOff"));
            Expect(_numlockMachine.currentState, Is.EqualTo(null));
            Expect(_capslockMachine.currentState, Is.EqualTo(null));

            // pressing capslock while unplugged does nothing
            sm.handleEvent("capslock");
            Expect(sm.currentState.id, Is.EqualTo("KeyboardOff"));

            // plug the keyboard back in and check whether the toggles are back at their initial states
            sm.handleEvent("plug");
            Expect(sm.currentState.id, Is.EqualTo("KeyboardOn"));
            Expect(_capslockMachine.currentState.id, Is.EqualTo("CapsLockOff"));
            Expect(_numlockMachine.currentState.id, Is.EqualTo("NumLockOff"));
        }
Beispiel #32
0
        public void GiveAnInstNameContainsMSSQLSERVER_ShouldntBeReplaced()
        {
            var path = InstancePathConversion.GetInstsPath("LOCALHOST", "MSSQLSERVER2012");

            Assert.That(path, Is.EqualTo(@".\MSSQLSERVER2012"));
        }
Beispiel #33
0
 public static void IsBlittableTest()
 {
     Assert.That(Marshal.SizeOf <HomeGroup>(), Is.EqualTo(sizeof(HomeGroup)));
 }
 public void IsNameEqual()
 {
     string name = "Raul";
     Assert.That(name, Is.EqualTo("Raul").IgnoreCase);
 }
Beispiel #35
0
void case_633()
#line 4557 "cs-parser.jay"
{
		var is_expr = new Is ((Expression) yyVals[-3+yyTop], (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-2+yyTop]));
		if (yyVals[0+yyTop] != null) {
			if (lang_version != LanguageVersion.Experimental)
				FeatureIsNotAvailable (GetLocation (yyVals[0+yyTop]), "type pattern matching");

			var lt = (LocatedToken) yyVals[0+yyTop];
			is_expr.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
			current_block.AddLocalName (is_expr.Variable);
		}

		yyVal = is_expr;
	  }
 public void Double()
 {
     double a = 1.0 / 3.0;
     Assert.That(a, Is.EqualTo(0.33).Within(0.004)); //Tolerance of amount
     Assert.That(a, Is.EqualTo(0.33).Within(5).Percent); // Tolerance of percentage
 }
Beispiel #37
0
void case_636()
#line 4585 "cs-parser.jay"
{
		Error_SyntaxError (yyToken);

		yyVal = new Is ((Expression) yyVals[-2+yyTop], null, GetLocation (yyVals[-1+yyTop]));
	  }
 public void TestSuite_ExpectedAttribute(string name, string value)
 {
     Assert.That(RequiredAttribute(suiteNode, name), Is.EqualTo(value));
 }
			public override object Visit (Is isExpression)
			{
				var result = new IsExpression ();
				if (isExpression.Expr != null)
					result.AddChild ((Expression)isExpression.Expr.Accept (this), Roles.Expression);
				result.AddChild (new CSharpTokenNode (Convert (isExpression.Location), IsExpression.IsKeywordRole), IsExpression.IsKeywordRole);
				
				if (isExpression.ProbeType != null)
					result.AddChild (ConvertToType (isExpression.ProbeType), Roles.Type);
				return result;
			}
 public void Document_HasThreeChildren()
 {
     Assert.That(doc.ChildNodes.Count, Is.EqualTo(3));
 }