From b0afe5671c53312d42f9aa8a5abcdddb91c3d119 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Wed, 30 Aug 2017 09:48:21 -0700 Subject: [PATCH] Bumped version number to 1.0.0; Creating the dev branch. (#9) (#10) --- firebase.go | 2 +- firebase_test.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/firebase.go b/firebase.go index 430b0676..00b4d7fc 100644 --- a/firebase.go +++ b/firebase.go @@ -35,7 +35,7 @@ var firebaseScopes = []string{ } // Version of the Firebase Go Admin SDK. -const Version = "0.0.1" +const Version = "1.0.0" // An App holds configuration and state common to all Firebase services that are exposed from the SDK. type App struct { diff --git a/firebase_test.go b/firebase_test.go index a5e198fb..9aa77977 100644 --- a/firebase_test.go +++ b/firebase_test.go @@ -19,6 +19,8 @@ import ( "net/http" "net/http/httptest" "os" + "strconv" + "strings" "testing" "time" @@ -231,6 +233,18 @@ func TestCustomTokenSource(t *testing.T) { } } +func TestVersion(t *testing.T) { + segments := strings.Split(Version, ".") + if len(segments) != 3 { + t.Errorf("Incorrect number of segments: %d; want: 3", len(segments)) + } + for _, segment := range segments { + if _, err := strconv.Atoi(segment); err != nil { + t.Errorf("Invalid segment in version number: %q; want integer", segment) + } + } +} + type testTokenSource struct { AccessToken string Expiry time.Time