Skip to content

Commit

Permalink
move examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dvrkps committed May 20, 2020
1 parent 337681c commit a1be842
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 37 deletions.
8 changes: 0 additions & 8 deletions jmbg_test.go
@@ -1,17 +1,9 @@
package valida

import (
"fmt"
"testing"
)

func ExampleJMBG() {
ok := JMBG("0308964384007")
fmt.Println(ok)
// Output:
// true
}

func TestJMBG(t *testing.T) {
var tests = []struct {
in string
Expand Down
36 changes: 36 additions & 0 deletions main_test.go
@@ -0,0 +1,36 @@
package valida

import "fmt"

func ExampleJMBG() {
ok := JMBG("0308964384007")
fmt.Println(ok)
// Output:
// true
}

func ExampleMBS() {
okShort := MBS("01130234")
fmt.Println(okShort)

okLong := MBS("011302340123")
fmt.Println(okLong)

// Output:
// true
// true
}

func ExampleMID() {
ok := MID("1333")
fmt.Println(ok)
// Output:
// true
}

func ExampleOIB() {
ok := OIB("69435151530")
fmt.Println(ok)
// Output:
// true
}
13 changes: 0 additions & 13 deletions mbs_test.go
@@ -1,22 +1,9 @@
package valida

import (
"fmt"
"testing"
)

func ExampleMBS() {
okShort := MBS("01130234")
fmt.Println(okShort)

okLong := MBS("011302340123")
fmt.Println(okLong)

// Output:
// true
// true
}

func TestMBS(t *testing.T) {
var tests = []struct {
in string
Expand Down
8 changes: 0 additions & 8 deletions mid_test.go
@@ -1,17 +1,9 @@
package valida

import (
"fmt"
"testing"
)

func ExampleMID() {
ok := MID("1333")
fmt.Println(ok)
// Output:
// true
}

func TestMID(t *testing.T) {
var tests = []struct {
in string
Expand Down
8 changes: 0 additions & 8 deletions oib_test.go
@@ -1,17 +1,9 @@
package valida

import (
"fmt"
"testing"
)

func ExampleOIB() {
ok := OIB("69435151530")
fmt.Println(ok)
// Output:
// true
}

func TestOIB(t *testing.T) {
var tests = []struct {
in string
Expand Down

0 comments on commit a1be842

Please sign in to comment.