Lines Matching refs:TestCase

62         [TestCase(" 1 ")]
63 [TestCase("+1")]
64 [TestCase("1,000")]
65 [TestCase("1.5")]
136 [TestCase(typeof(Int32Value), "32", 32)]
137 [TestCase(typeof(Int64Value), "32", 32L)]
138 [TestCase(typeof(UInt32Value), "32", 32U)]
139 [TestCase(typeof(UInt64Value), "32", 32UL)]
140 [TestCase(typeof(StringValue), "\"foo\"", "foo")]
141 [TestCase(typeof(FloatValue), "1.5", 1.5f)]
142 [TestCase(typeof(DoubleValue), "1.5", 1.5d)]
206 [TestCase("{ \"mapInt32Int32\": { \"10\": null }")]
207 [TestCase("{ \"mapStringString\": { \"abc\": null }")]
208 [TestCase("{ \"mapInt32ForeignMessage\": { \"10\": null }")]
239 [TestCase("0", 0)]
240 [TestCase("-0", 0)] // Not entirely clear whether we intend to allow this...
241 [TestCase("1", 1)]
242 [TestCase("-1", -1)]
243 [TestCase("2147483647", 2147483647)]
244 [TestCase("-2147483648", -2147483648)]
253 [TestCase("+0")]
254 [TestCase(" 1")]
255 [TestCase("1 ")]
256 [TestCase("00")]
257 [TestCase("-00")]
258 [TestCase("--1")]
259 [TestCase("+1")]
260 [TestCase("1.5")]
261 [TestCase("1e10")]
262 [TestCase("2147483648")]
263 [TestCase("-2147483649")]
271 [TestCase("0", 0U)]
272 [TestCase("1", 1U)]
273 [TestCase("4294967295", 4294967295U)]
283 [TestCase("-1")]
284 [TestCase("4294967296")]
292 [TestCase("0", 0L)]
293 [TestCase("1", 1L)]
294 [TestCase("-1", -1L)]
295 [TestCase("9223372036854775807", 9223372036854775807)]
296 [TestCase("-9223372036854775808", -9223372036854775808)]
306 [TestCase("-9223372036854775809")]
307 [TestCase("9223372036854775808")]
315 [TestCase("0", 0UL)]
316 [TestCase("1", 1UL)]
317 [TestCase("18446744073709551615", 18446744073709551615)]
327 [TestCase("-1")]
328 [TestCase("18446744073709551616")]
336 [TestCase("0", 0d)]
337 [TestCase("1", 1d)]
338 [TestCase("1.000000", 1d)]
339 …[TestCase("1.0000000000000000000000001", 1d)] // We don't notice that we haven't preserved the exa…
340 [TestCase("-1", -1d)]
341 [TestCase("1e1", 10d)]
342 [TestCase("1e01", 10d)] // Leading decimals are allowed in exponents
343 [TestCase("1E1", 10d)] // Either case is fine
344 [TestCase("-1e1", -10d)]
345 [TestCase("1.5e1", 15d)]
346 [TestCase("-1.5e1", -15d)]
347 [TestCase("15e-1", 1.5d)]
348 [TestCase("-15e-1", -1.5d)]
349 [TestCase("1.79769e308", 1.79769e308)]
350 [TestCase("-1.79769e308", -1.79769e308)]
351 [TestCase("Infinity", double.PositiveInfinity)]
352 [TestCase("-Infinity", double.NegativeInfinity)]
353 [TestCase("NaN", double.NaN)]
362 [TestCase("1.7977e308")]
363 [TestCase("-1.7977e308")]
364 [TestCase("1e309")]
365 [TestCase("1,0")]
366 [TestCase("1.0.0")]
367 [TestCase("+1")]
368 [TestCase("00")]
369 [TestCase("01")]
370 [TestCase("-00")]
371 [TestCase("-01")]
372 [TestCase("--1")]
373 [TestCase(" Infinity")]
374 [TestCase(" -Infinity")]
375 [TestCase("NaN ")]
376 [TestCase("Infinity ")]
377 [TestCase("-Infinity ")]
378 [TestCase(" NaN")]
379 [TestCase("INFINITY")]
380 [TestCase("nan")]
381 [TestCase("\u00BD")] // 1/2 as a single Unicode character. Just sanity checking...
389 [TestCase("0", 0f)]
390 [TestCase("1", 1f)]
391 [TestCase("1.000000", 1f)]
392 [TestCase("-1", -1f)]
393 [TestCase("3.402823e38", 3.402823e38f)]
394 [TestCase("-3.402823e38", -3.402823e38f)]
395 [TestCase("1.5e1", 15f)]
396 [TestCase("15e-1", 1.5f)]
405 [TestCase("3.402824e38")]
406 [TestCase("-3.402824e38")]
407 [TestCase("1,0")]
408 [TestCase("1.0.0")]
409 [TestCase("+1")]
410 [TestCase("00")]
411 [TestCase("--1")]
419 [TestCase("0", 0)]
420 [TestCase("-0", 0)] // Not entirely clear whether we intend to allow this...
421 [TestCase("1", 1)]
422 [TestCase("-1", -1)]
423 [TestCase("2147483647", 2147483647)]
424 [TestCase("-2147483648", -2147483648)]
425 [TestCase("1e1", 10)]
426 [TestCase("-1e1", -10)]
427 [TestCase("10.00", 10)]
428 [TestCase("-10.00", -10)]
437 [TestCase("+0", typeof(InvalidJsonException))]
438 [TestCase("00", typeof(InvalidJsonException))]
439 [TestCase("-00", typeof(InvalidJsonException))]
440 [TestCase("--1", typeof(InvalidJsonException))]
441 [TestCase("+1", typeof(InvalidJsonException))]
442 [TestCase("1.5", typeof(InvalidProtocolBufferException))]
444 [TestCase("1e10", typeof(InvalidProtocolBufferException))]
445 [TestCase("2147483648", typeof(InvalidProtocolBufferException))]
446 [TestCase("-2147483649", typeof(InvalidProtocolBufferException))]
454 [TestCase("0", 0U)]
455 [TestCase("1", 1U)]
456 [TestCase("4294967295", 4294967295U)]
466 [TestCase("-1")]
467 [TestCase("4294967296")]
475 [TestCase("0", 0L)]
476 [TestCase("1", 1L)]
477 [TestCase("-1", -1L)]
480 [TestCase("9223372036854774784", 9223372036854774784)]
481 [TestCase("-9223372036854775808", -9223372036854775808)]
491 [TestCase("9223372036854775808")]
495 [TestCase("-9223372036854780000")]
503 [TestCase("0", 0UL)]
504 [TestCase("1", 1UL)]
507 [TestCase("18446744073709549568", 18446744073709549568UL)]
517 [TestCase("-1")]
518 [TestCase("18446744073709551616")]
526 [TestCase("0", 0d)]
527 [TestCase("1", 1d)]
528 [TestCase("1.000000", 1d)]
529 …[TestCase("1.0000000000000000000000001", 1d)] // We don't notice that we haven't preserved the exa…
530 [TestCase("-1", -1d)]
531 [TestCase("1e1", 10d)]
532 [TestCase("1e01", 10d)] // Leading decimals are allowed in exponents
533 [TestCase("1E1", 10d)] // Either case is fine
534 [TestCase("-1e1", -10d)]
535 [TestCase("1.5e1", 15d)]
536 [TestCase("-1.5e1", -15d)]
537 [TestCase("15e-1", 1.5d)]
538 [TestCase("-15e-1", -1.5d)]
539 [TestCase("1.79769e308", 1.79769e308)]
540 [TestCase("-1.79769e308", -1.79769e308)]
549 [TestCase("1.7977e308")]
550 [TestCase("-1.7977e308")]
551 [TestCase("1e309")]
552 [TestCase("1,0")]
553 [TestCase("1.0.0")]
554 [TestCase("+1")]
555 [TestCase("00")]
556 [TestCase("--1")]
557 [TestCase("\u00BD")] // 1/2 as a single Unicode character. Just sanity checking...
565 [TestCase("0", 0f)]
566 [TestCase("1", 1f)]
567 [TestCase("1.000000", 1f)]
568 [TestCase("-1", -1f)]
569 [TestCase("3.402823e38", 3.402823e38f)]
570 [TestCase("-3.402823e38", -3.402823e38f)]
571 [TestCase("1.5e1", 15f)]
572 [TestCase("15e-1", 1.5f)]
581 [TestCase("3.402824e38", typeof(InvalidProtocolBufferException))]
582 [TestCase("-3.402824e38", typeof(InvalidProtocolBufferException))]
583 [TestCase("1,0", typeof(InvalidJsonException))]
584 [TestCase("1.0.0", typeof(InvalidJsonException))]
585 [TestCase("+1", typeof(InvalidJsonException))]
586 [TestCase("00", typeof(InvalidJsonException))]
587 [TestCase("--1", typeof(InvalidJsonException))]
600 [TestCase("2015-10-09T14:46:23.123456789Z", null)]
601 [TestCase("2015-10-09T14:46:23.123456Z", null)]
602 [TestCase("2015-10-09T14:46:23.123Z", null)]
603 [TestCase("2015-10-09T14:46:23Z", null)]
604 [TestCase("2015-10-09T14:46:23.123456000Z", "2015-10-09T14:46:23.123456Z")]
605 [TestCase("2015-10-09T14:46:23.1234560Z", "2015-10-09T14:46:23.123456Z")]
606 [TestCase("2015-10-09T14:46:23.123000000Z", "2015-10-09T14:46:23.123Z")]
607 [TestCase("2015-10-09T14:46:23.1230Z", "2015-10-09T14:46:23.123Z")]
608 [TestCase("2015-10-09T14:46:23.00Z", "2015-10-09T14:46:23Z")]
611 [TestCase("2015-10-09T14:46:23.123456789+00:00", "2015-10-09T14:46:23.123456789Z")]
612 [TestCase("2015-10-09T14:46:23.123456+00:00", "2015-10-09T14:46:23.123456Z")]
613 [TestCase("2015-10-09T14:46:23.123+00:00", "2015-10-09T14:46:23.123Z")]
614 [TestCase("2015-10-09T14:46:23+00:00", "2015-10-09T14:46:23Z")]
615 [TestCase("2015-10-09T14:46:23.123456000+00:00", "2015-10-09T14:46:23.123456Z")]
616 [TestCase("2015-10-09T14:46:23.1234560+00:00", "2015-10-09T14:46:23.123456Z")]
617 [TestCase("2015-10-09T14:46:23.123000000+00:00", "2015-10-09T14:46:23.123Z")]
618 [TestCase("2015-10-09T14:46:23.1230+00:00", "2015-10-09T14:46:23.123Z")]
619 [TestCase("2015-10-09T14:46:23.00+00:00", "2015-10-09T14:46:23Z")]
622 [TestCase("2015-10-09T15:46:23.123456789+01:00", "2015-10-09T14:46:23.123456789Z")]
623 [TestCase("2015-10-09T13:46:23.123456789-01:00", "2015-10-09T14:46:23.123456789Z")]
624 [TestCase("2015-10-09T15:16:23.123456789+00:30", "2015-10-09T14:46:23.123456789Z")]
625 [TestCase("2015-10-09T14:16:23.123456789-00:30", "2015-10-09T14:46:23.123456789Z")]
626 [TestCase("2015-10-09T16:31:23.123456789+01:45", "2015-10-09T14:46:23.123456789Z")]
627 [TestCase("2015-10-09T13:01:23.123456789-01:45", "2015-10-09T14:46:23.123456789Z")]
628 [TestCase("2015-10-10T08:46:23.123456789+18:00", "2015-10-09T14:46:23.123456789Z")]
629 [TestCase("2015-10-08T20:46:23.123456789-18:00", "2015-10-09T14:46:23.123456789Z")]
632 [TestCase("2016-02-29T14:46:23.123456789Z", null)]
633 [TestCase("2000-02-29T14:46:23.123456789Z", null)]
634 [TestCase("0001-01-01T00:00:00Z", null)]
635 [TestCase("9999-12-31T23:59:59.999999999Z", null)]
645 [TestCase("2015-10-09 14:46:23.123456789Z", Description = "No T between date and time")]
646 [TestCase("2015/10/09T14:46:23.123456789Z", Description = "Wrong date separators")]
647 [TestCase("2015-10-09T14.46.23.123456789Z", Description = "Wrong time separators")]
648 …[TestCase("2015-10-09T14:46:23,123456789Z", Description = "Wrong fractional second separators (val…
649 [TestCase(" 2015-10-09T14:46:23.123456789Z", Description = "Whitespace at start")]
650 [TestCase("2015-10-09T14:46:23.123456789Z ", Description = "Whitespace at end")]
651 [TestCase("2015-10-09T14:46:23.1234567890", Description = "Too many digits")]
652 [TestCase("2015-10-09T14:46:23.123456789", Description = "No offset")]
653 [TestCase("2015-13-09T14:46:23.123456789Z", Description = "Invalid month")]
654 [TestCase("2015-10-32T14:46:23.123456789Z", Description = "Invalid day")]
655 … [TestCase("2015-10-09T24:00:00.000000000Z", Description = "Invalid hour (valid ISO-8601 though)")]
656 [TestCase("2015-10-09T14:60:23.123456789Z", Description = "Invalid minutes")]
657 [TestCase("2015-10-09T14:46:60.123456789Z", Description = "Invalid seconds")]
658 … [TestCase("2015-10-09T14:46:23.123456789+18:01", Description = "Offset too large (positive)")]
659 … [TestCase("2015-10-09T14:46:23.123456789-18:01", Description = "Offset too large (negative)")]
660 …[TestCase("2015-10-09T14:46:23.123456789-00:00", Description = "Local offset (-00:00) makes no sen…
661 … [TestCase("0001-01-01T00:00:00+00:01", Description = "Value before earliest when offset applied")]
662 …[TestCase("9999-12-31T23:59:59.999999999-00:01", Description = "Value after latest when offset app…
663 [TestCase("2100-02-29T14:46:23.123456789Z", Description = "Feb 29th on a non-leap-year")]
720 [TestCase("1.123456789s", null)]
721 [TestCase("1.123456s", null)]
722 [TestCase("1.123s", null)]
723 [TestCase("1.12300s", "1.123s")]
724 [TestCase("1.12345s", "1.123450s")]
725 [TestCase("1s", null)]
726 [TestCase("-1.123456789s", null)]
727 [TestCase("-1.123456s", null)]
728 [TestCase("-1.123s", null)]
729 [TestCase("-1s", null)]
730 [TestCase("0.123s", null)]
731 [TestCase("-0.123s", null)]
732 [TestCase("123456.123s", null)]
733 [TestCase("-123456.123s", null)]
735 [TestCase("315576000000s", null)]
736 [TestCase("-315576000000s", null)]
750 [TestCase("1.1234567890s", Description = "Too many digits")]
751 [TestCase("1.123456789", Description = "No suffix")]
752 [TestCase("1.123456789ss", Description = "Too much suffix")]
753 [TestCase("1.123456789S", Description = "Upper case suffix")]
754 [TestCase("+1.123456789s", Description = "Leading +")]
755 [TestCase(".123456789s", Description = "No integer before the fraction")]
756 [TestCase("1,123456789s", Description = "Comma as decimal separator")]
757 [TestCase("1x1.123456789s", Description = "Non-digit in integer part")]
758 [TestCase("1.1x3456789s", Description = "Non-digit in fractional part")]
759 [TestCase(" 1.123456789s", Description = "Whitespace before fraction")]
760 [TestCase("1.123456789s ", Description = "Whitespace after value")]
761 [TestCase("01.123456789s", Description = "Leading zero (positive)")]
762 [TestCase("-01.123456789s", Description = "Leading zero (negative)")]
763 [TestCase("--0.123456789s", Description = "Double minus sign")]
765 [TestCase("315576000001s", Description = "Integer part too large")]
766 [TestCase("3155760000000s", Description = "Integer part too long (positive)")]
767 [TestCase("-3155760000000s", Description = "Integer part too long (negative)")]
778 [TestCase("")]
779 [TestCase("foo", "foo")]
780 [TestCase("foo,bar", "foo", "bar")]
781 [TestCase("foo.bar", "foo.bar")]
782 [TestCase("fooBar", "foo_bar")]
783 [TestCase("fooBar.bazQux", "foo_bar.baz_qux")]
792 [TestCase("foo_bar")]
891 [TestCase("AQI")]
892 [TestCase("_-==")]
900 [TestCase("\"FOREIGN_BAR\"", ForeignEnum.ForeignBar)]
901 [TestCase("5", ForeignEnum.ForeignBar)]
902 [TestCase("100", (ForeignEnum)100)]
911 [TestCase("\"NOT_A_VALID_VALUE\"")]
912 [TestCase("5.5")]