List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:July 7 2011 1:13pm
Subject:bzr push into mysql-trunk branch (tor.didriksen:3253 to 3254) Bug#12608543
View as plain text  
 3254 Tor Didriksen	2011-07-07
      Bug#12608543 Add unit test.

    modified:
      unittest/gunit/my_decimal-t.cc
 3253 Tor Didriksen	2011-07-07 [merge]
      Automerge opt-team => trunk

    added:
      mysql-test/include/explain_non_select.inc
      mysql-test/include/explain_utils.inc
      mysql-test/r/grant_explain_non_select.result
      mysql-test/r/innodb_explain_non_select_all.result
      mysql-test/r/innodb_explain_non_select_none.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/myisam_explain_non_select_none.result
      mysql-test/t/grant_explain_non_select.test
      mysql-test/t/innodb_explain_non_select_all.test
      mysql-test/t/innodb_explain_non_select_none.test
      mysql-test/t/myisam_explain_non_select_all.test
      mysql-test/t/myisam_explain_non_select_none.test
      sql/opt_explain.cc
      sql/opt_explain.h
    modified:
      client/mysqltest.cc
      mysql-test/r/explain.result
      mysql-test/r/join_outer.result
      mysql-test/r/join_outer_jcl6.result
      mysql-test/r/partition_pruning.result
      mysql-test/t/explain.test
      mysql-test/t/partition_pruning.test
      sql/CMakeLists.txt
      sql/opt_range.h
      sql/sql_class.h
      sql/sql_delete.cc
      sql/sql_insert.cc
      sql/sql_parse.cc
      sql/sql_parse.h
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_show.cc
      sql/sql_string.h
      sql/sql_update.cc
      sql/sql_view.cc
      sql/sql_yacc.yy
=== modified file 'unittest/gunit/my_decimal-t.cc'
--- a/unittest/gunit/my_decimal-t.cc	2011-01-14 09:29:11 +0000
+++ b/unittest/gunit/my_decimal-t.cc	2011-07-07 13:01:34 +0000
@@ -54,4 +54,20 @@ TEST_F(DecimalTest, CopyAndCompare)
   EXPECT_EQ(1, my_decimal_cmp(&d1, &d3));
 }
 
+
+TEST_F(DecimalTest, Swap)
+{
+  ulonglong val1= 1;
+  ulonglong val2= 2;
+  EXPECT_EQ(0, ulonglong2decimal(val1, &d1));
+  EXPECT_EQ(0, ulonglong2decimal(val2, &d2));
+  my_decimal d1copy(d1);
+  my_decimal d2copy(d2);
+  EXPECT_EQ(0, my_decimal_cmp(&d1, &d1copy));
+  EXPECT_EQ(0, my_decimal_cmp(&d2, &d2copy));
+  d1.swap(d2);
+  EXPECT_EQ(0, my_decimal_cmp(&d2, &d1copy));
+  EXPECT_EQ(0, my_decimal_cmp(&d1, &d2copy));
+}
+
 }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3253 to 3254) Bug#12608543Tor Didriksen7 Jul