r114089 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114088‎ | r114089 | r114090 >
Date:23:26, 17 March 2012
Author:jeroendedauw
Status:reverted
Tags:gerritmigration 
Comment:
follow up to r114084, add tests for stuff w/ multiple units
Modified paths:
  • /trunk/phase3/tests/phpunit/languages/LanguageTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/languages/LanguageTest.php
@@ -537,48 +537,48 @@
538538 return array(
539539 array(
540540 0,
541 - "0 B",
542 - "Zero bytes"
 541+ '0 B',
 542+ 'Zero bytes'
543543 ),
544544 array(
545545 1024,
546 - "1 KB",
547 - "1 kilobyte"
 546+ '1 KB',
 547+ '1 kilobyte'
548548 ),
549549 array(
550550 1024 * 1024,
551 - "1 MB",
552 - "1,024 megabytes"
 551+ '1 MB',
 552+ '1,024 megabytes'
553553 ),
554554 array(
555555 1024 * 1024 * 1024,
556 - "1 GB",
557 - "1 gigabytes"
 556+ '1 GB',
 557+ '1 gigabytes'
558558 ),
559559 array(
560560 pow( 1024, 4 ),
561 - "1 TB",
562 - "1 terabyte"
 561+ '1 TB',
 562+ '1 terabyte'
563563 ),
564564 array(
565565 pow( 1024, 5 ),
566 - "1 PB",
567 - "1 petabyte"
 566+ '1 PB',
 567+ '1 petabyte'
568568 ),
569569 array(
570570 pow( 1024, 6 ),
571 - "1 EB",
572 - "1,024 exabyte"
 571+ '1 EB',
 572+ '1,024 exabyte'
573573 ),
574574 array(
575575 pow( 1024, 7 ),
576 - "1 ZB",
577 - "1 zetabyte"
 576+ '1 ZB',
 577+ '1 zetabyte'
578578 ),
579579 array(
580580 pow( 1024, 8 ),
581 - "1 YB",
582 - "1 yottabyte"
 581+ '1 YB',
 582+ '1 yottabyte'
583583 ),
584584 // How big!? THIS BIG!
585585 );
@@ -599,58 +599,58 @@
600600 return array(
601601 array(
602602 0,
603 - "0bps",
604 - "0 bits per second"
 603+ '0bps',
 604+ '0 bits per second'
605605 ),
606606 array(
607607 999,
608 - "999bps",
609 - "999 bits per second"
 608+ '999bps',
 609+ '999 bits per second'
610610 ),
611611 array(
612612 1000,
613 - "1kbps",
614 - "1 kilobit per second"
 613+ '1kbps',
 614+ '1 kilobit per second'
615615 ),
616616 array(
617617 1000 * 1000,
618 - "1Mbps",
619 - "1 megabit per second"
 618+ '1Mbps',
 619+ '1 megabit per second'
620620 ),
621621 array(
622622 pow( 10, 9 ),
623 - "1Gbps",
624 - "1 gigabit per second"
 623+ '1Gbps',
 624+ '1 gigabit per second'
625625 ),
626626 array(
627627 pow( 10, 12 ),
628 - "1Tbps",
629 - "1 terabit per second"
 628+ '1Tbps',
 629+ '1 terabit per second'
630630 ),
631631 array(
632632 pow( 10, 15 ),
633 - "1Pbps",
634 - "1 petabit per second"
 633+ '1Pbps',
 634+ '1 petabit per second'
635635 ),
636636 array(
637637 pow( 10, 18 ),
638 - "1Ebps",
639 - "1 exabit per second"
 638+ '1Ebps',
 639+ '1 exabit per second'
640640 ),
641641 array(
642642 pow( 10, 21 ),
643 - "1Zbps",
644 - "1 zetabit per second"
 643+ '1Zbps',
 644+ '1 zetabit per second'
645645 ),
646646 array(
647647 pow( 10, 24 ),
648 - "1Ybps",
649 - "1 yottabit per second"
 648+ '1Ybps',
 649+ '1 yottabit per second'
650650 ),
651651 array(
652652 pow( 10, 27 ),
653 - "1,000Ybps",
654 - "1,000 yottabits per second"
 653+ '1,000Ybps',
 654+ '1,000 yottabits per second'
655655 ),
656656 );
657657 }
@@ -670,72 +670,88 @@
671671 return array(
672672 array(
673673 0,
674 - "0 seconds",
 674+ '0 seconds',
675675 ),
676676 array(
677677 1,
678 - "1 second",
 678+ '1 second',
679679 ),
680680 array(
681681 2,
682 - "2 seconds",
 682+ '2 seconds',
683683 ),
684684 array(
685685 60,
686 - "1 minute",
 686+ '1 minute',
687687 ),
688688 array(
689689 2 * 60,
690 - "2 minutes",
 690+ '2 minutes',
691691 ),
692692 array(
693693 3600,
694 - "1 hour",
 694+ '1 hour',
695695 ),
696696 array(
697697 2 * 3600,
698 - "2 hours",
 698+ '2 hours',
699699 ),
700700 array(
701701 24 * 3600,
702 - "1 day",
 702+ '1 day',
703703 ),
704704 array(
705705 2 * 86400,
706 - "2 days",
 706+ '2 days',
707707 ),
708708 array(
709709 365.25 * 86400, // 365.25 * 86400 = 31557600
710 - "1 year",
 710+ '1 year',
711711 ),
712712 array(
713713 2 * 31557600,
714 - "2 years",
 714+ '2 years',
715715 ),
716716 array(
717717 10 * 31557600,
718 - "1 decade",
 718+ '1 decade',
719719 ),
720720 array(
721721 20 * 31557600,
722 - "2 decades",
 722+ '2 decades',
723723 ),
724724 array(
725725 100 * 31557600,
726 - "1 century",
 726+ '1 century',
727727 ),
728728 array(
729729 200 * 31557600,
730 - "2 centuries",
 730+ '2 centuries',
731731 ),
732732 array(
733733 1000 * 31557600,
734 - "1 millennium",
 734+ '1 millennium',
735735 ),
736736 array(
737737 2000 * 31557600,
738 - "2 millennia",
 738+ '2 millennia',
739739 ),
 740+ array(
 741+ 9001,
 742+ '2 hours, 30 minutes and 1 second'
 743+ ),
 744+ array(
 745+ 3601,
 746+ '1 hour and 1 second'
 747+ ),
 748+ array(
 749+ 31557600 + 2 * 86400 + 9000,
 750+ '1 year, 2 days, 2 hours and 30 minutes'
 751+ ),
 752+ array(
 753+ 42 * 1000 * 31557600 + 42,
 754+ '42 millennia and 42 seconds'
 755+ ),
740756 );
741757 }
742758 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r114326Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086......catrope23:03, 20 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114084Unit tests for r114067reedy22:39, 17 March 2012

Status & tagging log