Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:29:09+00:00 2026-06-10T01:29:09+00:00

I installed go and tried the first part on How to write go code

  • 0

I installed go and tried the first part on How to write go code

And after a while of not seeing the desired result I notice go test always passes, always!

What am I missing?

$ go version
go version go1
$ mkdir -p src/example/math 

$ cat >src/example/math/sum_test.go <<.
> package math
>
> import "testing"
>
> func SumTest( t *testing.T ) {
>    t.Errorf("ssss %d", 1 )
> }
> .

$ go test example/math
ok      example/math    0.044s

I’m using windows x64 and I’m using git-bash as shell

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:29:11+00:00Added an answer on June 10, 2026 at 1:29 am

    From the go command man page:

    A test function is one named TestXXX (where XXX is any alphanumeric string not starting with a lower case letter) and should have the signature,

    func TestXXX(t *testing.T) { ... }
    

    Your SumTest() function doesn’t follow that pattern, and is likely to be ignored.
    This should work better:

    func TestSum( t *testing.T )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried using AJAX Control for my first time after I installed the AJAX
I just installed Oracle for the first time. To test the installation, I tried
I installed postgres on my Mac and tried it for the first time with
I just tried (for the first time, I might add) a port upgrade installed
At first,I tried to use ppm and cpanm to install Tk module.But failed to
I tried to install MVC Framework from the below URL http://www.asp.net/mVC/ First it is
I came across bpython and tried to installed it on my windows system with
I just installed Visual Studio 2012 RC and tried to run a service with
Installed rubyinstaller-1.8.7-p358.exe, then tried to install jammit , but the config.gem command isn't being
I have installed the dot net provider and tried to reference the FirebirdSql.Data.FirebirdClient.dll in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.