forked from JamesStewy/go-mysqldump
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from BrandonRoehl/master
Reduce the memory usage by leaving values as the arrays they are
- Loading branch information
Showing
3 changed files
with
42 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -208,7 +208,7 @@ func TestCreateTableValuesOk(t *testing.T) { | |
t.Errorf("there were unfulfilled expections: %s", err) | ||
} | ||
|
||
expectedResult := "('1','[email protected]','Test Name 1'),('2','[email protected]','Test Name 2')" | ||
expectedResult := []string{"('1','[email protected]','Test Name 1')", "('2','[email protected]','Test Name 2')"} | ||
|
||
if !reflect.DeepEqual(result, expectedResult) { | ||
t.Fatalf("expected %#v, got %#v", expectedResult, result) | ||
|
@@ -244,7 +244,7 @@ func TestCreateTableValuesNil(t *testing.T) { | |
t.Errorf("there were unfulfilled expections: %s", err) | ||
} | ||
|
||
expectedResult := "('1',NULL,'Test Name 1'),('2','[email protected]','Test Name 2'),('3','','Test Name 3')" | ||
expectedResult := []string{"('1',NULL,'Test Name 1')", "('2','[email protected]','Test Name 2')", "('3','','Test Name 3')"} | ||
|
||
if !reflect.DeepEqual(result, expectedResult) { | ||
t.Fatalf("expected %#v, got %#v", expectedResult, result) | ||
|
@@ -286,7 +286,7 @@ func TestCreateTableOk(t *testing.T) { | |
expectedResult := &table{ | ||
Name: "`Test_Table`", | ||
SQL: "CREATE TABLE 'Test_Table' (`id` int(11) NOT NULL AUTO_INCREMENT,`s` char(60) DEFAULT NULL, PRIMARY KEY (`id`))ENGINE=InnoDB DEFAULT CHARSET=latin1", | ||
Values: "('1',NULL,'Test Name 1'),('2','[email protected]','Test Name 2')", | ||
Values: []string{"('1',NULL,'Test Name 1')", "('2','[email protected]','Test Name 2')"}, | ||
} | ||
|
||
if !reflect.DeepEqual(result, expectedResult) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters