Skip to content

Instantly share code, notes, and snippets.

@c1982
Created November 28, 2017 13:21
Show Gist options
  • Save c1982/6b17e1df5f46dccca3ed1e94dede8d8d to your computer and use it in GitHub Desktop.
Save c1982/6b17e1df5f46dccca3ed1e94dede8d8d to your computer and use it in GitHub Desktop.
Old golang test
package yaziya
import (
"testing"
)
func Test_Yaziya_Cevir_Birler(t *testing.T) {
var price float64
price = 5
text, err := Cevir(price)
if err != nil {
t.Error(err)
}
if text != "beş" {
t.Error("Text:", text)
}
}
func Test_Yaziya_Cevir_Onlar(t *testing.T) {
var price float64
price = 25
text, err := Cevir(price)
if err != nil {
t.Error(err)
}
if text != "yirmibeş" {
t.Error("Text:", text)
}
}
func Test_Yaziya_Cevir_Yuzler(t *testing.T) {
var price float64
price = 587
text, err := Cevir(price)
if err != nil {
t.Error(err)
}
if text != "beşyüzseksenyedi" {
t.Error("Text:", text)
}
}
func Test_Yaziya_Cevir_Binler(t *testing.T) {
var price float64
price = 1458
text, err := Cevir(price)
if err != nil {
t.Error(err)
}
if text != "bin dörtyüzellisekiz" {
t.Error("Text:", text)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment