-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Landscape picture has high priority. * Update README.
- Loading branch information
Showing
15 changed files
with
111 additions
and
27 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
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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package main | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func Test_main(t *testing.T) { | ||
i, u, r, d, v := getFlag() | ||
if *i != false { | ||
t.Error(`"-i" default value should be false`) | ||
} | ||
if *u != false { | ||
t.Error(`"-u" default value should be false`) | ||
} | ||
if *r != false { | ||
t.Error(`"-r" default value should be false`) | ||
} | ||
if *d != false { | ||
t.Error(`"-d" default value should be false`) | ||
} | ||
if *v != false { | ||
t.Error(`"-v" default value should be false`) | ||
} | ||
} |
Binary file not shown.
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
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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package px500 | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func Test_randPhoto(t *testing.T) { | ||
photos := Photos{ | ||
Photos: []Photo{ | ||
Photo{ | ||
Width: 1, | ||
Height: 2, | ||
}, | ||
Photo{ | ||
Width: 3, | ||
Height: 4, | ||
}, | ||
Photo{ | ||
Width: 6, | ||
Height: 5, | ||
}, | ||
}, | ||
} | ||
p := randPhoto(&photos) | ||
if p.Width != 6 || p.Height != 5 { | ||
t.Error("The width must larger than the height.") | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fmt: | ||
|
||
go fmt . ./app ./px500 | ||
|
||
test: | ||
|
||
go test . ./app ./px500 |