@@ -703,65 +703,65 @@ TEST(TestStringOps, TestLpadString) {
703703 const char * out_str;
704704
705705 // LPAD function tests - with defined fill pad text
706- out_str = lpad (ctx_ptr, " TestString" , 10 , 4 , " fill" , 4 , &out_len);
706+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 4 , " fill" , 4 , &out_len);
707707 EXPECT_EQ (std::string (out_str, out_len), " Test" );
708708
709- out_str = lpad (ctx_ptr, " TestString" , 10 , 10 , " fill" , 4 , &out_len);
709+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 10 , " fill" , 4 , &out_len);
710710 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
711711
712- out_str = lpad (ctx_ptr, " TestString" , 0 , 10 , " fill" , 4 , &out_len);
712+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 0 , 10 , " fill" , 4 , &out_len);
713713 EXPECT_EQ (std::string (out_str, out_len), " " );
714714
715- out_str = lpad (ctx_ptr, " TestString" , 10 , 0 , " fill" , 4 , &out_len);
715+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 0 , " fill" , 4 , &out_len);
716716 EXPECT_EQ (std::string (out_str, out_len), " " );
717717
718- out_str = lpad (ctx_ptr, " TestString" , 10 , -500 , " fill" , 4 , &out_len);
718+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , -500 , " fill" , 4 , &out_len);
719719 EXPECT_EQ (std::string (out_str, out_len), " " );
720720
721- out_str = lpad (ctx_ptr, " TestString" , 10 , 500 , " " , 0 , &out_len);
721+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 500 , " " , 0 , &out_len);
722722 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
723723
724- out_str = lpad (ctx_ptr, " TestString" , 10 , 18 , " Fill" , 4 , &out_len);
724+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 18 , " Fill" , 4 , &out_len);
725725 EXPECT_EQ (std::string (out_str, out_len), " FillFillTestString" );
726726
727- out_str = lpad (ctx_ptr, " TestString" , 10 , 15 , " Fill" , 4 , &out_len);
727+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 15 , " Fill" , 4 , &out_len);
728728 EXPECT_EQ (std::string (out_str, out_len), " FillFTestString" );
729729
730- out_str = lpad (ctx_ptr, " TestString" , 10 , 20 , " Fill" , 4 , &out_len);
730+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 20 , " Fill" , 4 , &out_len);
731731 EXPECT_EQ (std::string (out_str, out_len), " FillFillFiTestString" );
732732
733- out_str = lpad (ctx_ptr, " абвгд" , 10 , 7 , " д" , 2 , &out_len);
733+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " абвгд" , 10 , 7 , " д" , 2 , &out_len);
734734 EXPECT_EQ (std::string (out_str, out_len), " ддабвгд" );
735735
736- out_str = lpad (ctx_ptr, " абвгд" , 10 , 20 , " абвгд" , 10 , &out_len);
736+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " абвгд" , 10 , 20 , " абвгд" , 10 , &out_len);
737737 EXPECT_EQ (std::string (out_str, out_len), " абвгдабвгдабвгдабвгд" );
738738
739- out_str = lpad (ctx_ptr, " hello" , 5 , 6 , " д" , 2 , &out_len);
739+ out_str = lpad_utf8_int32_utf8 (ctx_ptr, " hello" , 5 , 6 , " д" , 2 , &out_len);
740740 EXPECT_EQ (std::string (out_str, out_len), " дhello" );
741741
742742 // LPAD function tests - with NO pad text
743- out_str = lpad_no_fill_text (ctx_ptr, " TestString" , 10 , 4 , &out_len);
743+ out_str = lpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 4 , &out_len);
744744 EXPECT_EQ (std::string (out_str, out_len), " Test" );
745745
746- out_str = lpad_no_fill_text (ctx_ptr, " TestString" , 10 , 10 , &out_len);
746+ out_str = lpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 10 , &out_len);
747747 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
748748
749- out_str = lpad_no_fill_text (ctx_ptr, " TestString" , 0 , 10 , &out_len);
749+ out_str = lpad_utf8_int32 (ctx_ptr, " TestString" , 0 , 10 , &out_len);
750750 EXPECT_EQ (std::string (out_str, out_len), " " );
751751
752- out_str = lpad_no_fill_text (ctx_ptr, " TestString" , 10 , 0 , &out_len);
752+ out_str = lpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 0 , &out_len);
753753 EXPECT_EQ (std::string (out_str, out_len), " " );
754754
755- out_str = lpad_no_fill_text (ctx_ptr, " TestString" , 10 , -500 , &out_len);
755+ out_str = lpad_utf8_int32 (ctx_ptr, " TestString" , 10 , -500 , &out_len);
756756 EXPECT_EQ (std::string (out_str, out_len), " " );
757757
758- out_str = lpad_no_fill_text (ctx_ptr, " TestString" , 10 , 18 , &out_len);
758+ out_str = lpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 18 , &out_len);
759759 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
760760
761- out_str = lpad_no_fill_text (ctx_ptr, " TestString" , 10 , 15 , &out_len);
761+ out_str = lpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 15 , &out_len);
762762 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
763763
764- out_str = lpad_no_fill_text (ctx_ptr, " абвгд" , 10 , 7 , &out_len);
764+ out_str = lpad_utf8_int32 (ctx_ptr, " абвгд" , 10 , 7 , &out_len);
765765 EXPECT_EQ (std::string (out_str, out_len), " абвгд" );
766766}
767767
@@ -772,65 +772,65 @@ TEST(TestStringOps, TestRpadString) {
772772 const char * out_str;
773773
774774 // RPAD function tests - with defined fill pad text
775- out_str = rpad (ctx_ptr, " TestString" , 10 , 4 , " fill" , 4 , &out_len);
775+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 4 , " fill" , 4 , &out_len);
776776 EXPECT_EQ (std::string (out_str, out_len), " Test" );
777777
778- out_str = rpad (ctx_ptr, " TestString" , 10 , 10 , " fill" , 4 , &out_len);
778+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 10 , " fill" , 4 , &out_len);
779779 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
780780
781- out_str = rpad (ctx_ptr, " TestString" , 0 , 10 , " fill" , 4 , &out_len);
781+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 0 , 10 , " fill" , 4 , &out_len);
782782 EXPECT_EQ (std::string (out_str, out_len), " " );
783783
784- out_str = rpad (ctx_ptr, " TestString" , 10 , 0 , " fill" , 4 , &out_len);
784+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 0 , " fill" , 4 , &out_len);
785785 EXPECT_EQ (std::string (out_str, out_len), " " );
786786
787- out_str = rpad (ctx_ptr, " TestString" , 10 , -500 , " fill" , 4 , &out_len);
787+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , -500 , " fill" , 4 , &out_len);
788788 EXPECT_EQ (std::string (out_str, out_len), " " );
789789
790- out_str = rpad (ctx_ptr, " TestString" , 10 , 500 , " " , 0 , &out_len);
790+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 500 , " " , 0 , &out_len);
791791 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
792792
793- out_str = rpad (ctx_ptr, " TestString" , 10 , 18 , " Fill" , 4 , &out_len);
793+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 18 , " Fill" , 4 , &out_len);
794794 EXPECT_EQ (std::string (out_str, out_len), " TestStringFillFill" );
795795
796- out_str = rpad (ctx_ptr, " TestString" , 10 , 15 , " Fill" , 4 , &out_len);
796+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 15 , " Fill" , 4 , &out_len);
797797 EXPECT_EQ (std::string (out_str, out_len), " TestStringFillF" );
798798
799- out_str = rpad (ctx_ptr, " TestString" , 10 , 20 , " Fill" , 4 , &out_len);
799+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " TestString" , 10 , 20 , " Fill" , 4 , &out_len);
800800 EXPECT_EQ (std::string (out_str, out_len), " TestStringFillFillFi" );
801801
802- out_str = rpad (ctx_ptr, " абвгд" , 10 , 7 , " д" , 2 , &out_len);
802+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " абвгд" , 10 , 7 , " д" , 2 , &out_len);
803803 EXPECT_EQ (std::string (out_str, out_len), " абвгддд" );
804804
805- out_str = rpad (ctx_ptr, " абвгд" , 10 , 20 , " абвгд" , 10 , &out_len);
805+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " абвгд" , 10 , 20 , " абвгд" , 10 , &out_len);
806806 EXPECT_EQ (std::string (out_str, out_len), " абвгдабвгдабвгдабвгд" );
807807
808- out_str = rpad (ctx_ptr, " hello" , 5 , 6 , " д" , 2 , &out_len);
808+ out_str = rpad_utf8_int32_utf8 (ctx_ptr, " hello" , 5 , 6 , " д" , 2 , &out_len);
809809 EXPECT_EQ (std::string (out_str, out_len), " helloд" );
810810
811811 // RPAD function tests - with NO pad text
812- out_str = rpad_no_fill_text (ctx_ptr, " TestString" , 10 , 4 , &out_len);
812+ out_str = rpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 4 , &out_len);
813813 EXPECT_EQ (std::string (out_str, out_len), " Test" );
814814
815- out_str = rpad_no_fill_text (ctx_ptr, " TestString" , 10 , 10 , &out_len);
815+ out_str = rpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 10 , &out_len);
816816 EXPECT_EQ (std::string (out_str, out_len), " TestString" );
817817
818- out_str = rpad_no_fill_text (ctx_ptr, " TestString" , 0 , 10 , &out_len);
818+ out_str = rpad_utf8_int32 (ctx_ptr, " TestString" , 0 , 10 , &out_len);
819819 EXPECT_EQ (std::string (out_str, out_len), " " );
820820
821- out_str = rpad_no_fill_text (ctx_ptr, " TestString" , 10 , 0 , &out_len);
821+ out_str = rpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 0 , &out_len);
822822 EXPECT_EQ (std::string (out_str, out_len), " " );
823823
824- out_str = rpad_no_fill_text (ctx_ptr, " TestString" , 10 , -500 , &out_len);
824+ out_str = rpad_utf8_int32 (ctx_ptr, " TestString" , 10 , -500 , &out_len);
825825 EXPECT_EQ (std::string (out_str, out_len), " " );
826826
827- out_str = rpad_no_fill_text (ctx_ptr, " TestString" , 10 , 18 , &out_len);
827+ out_str = rpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 18 , &out_len);
828828 EXPECT_EQ (std::string (out_str, out_len), " TestString " );
829829
830- out_str = rpad_no_fill_text (ctx_ptr, " TestString" , 10 , 15 , &out_len);
830+ out_str = rpad_utf8_int32 (ctx_ptr, " TestString" , 10 , 15 , &out_len);
831831 EXPECT_EQ (std::string (out_str, out_len), " TestString " );
832832
833- out_str = rpad_no_fill_text (ctx_ptr, " абвгд" , 10 , 7 , &out_len);
833+ out_str = rpad_utf8_int32 (ctx_ptr, " абвгд" , 10 , 7 , &out_len);
834834 EXPECT_EQ (std::string (out_str, out_len), " абвгд " );
835835}
836836
0 commit comments