Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test classfile: App.M() #1753

Merged
merged 1 commit into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ $ brew install goplus

### from source code

For now, we suggest you install Go+ from source code.

Note: Requires go1.18 or later

```bash
Expand Down
5 changes: 4 additions & 1 deletion test/classfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (p *Case) initCase(t *testing.T) {
p.t = t
}

// T returns a *testing.T object.
// T returns the *testing.T object .
func (p Case) T() *testing.T { return p.t }

// Run runs f as a subtest of t called name. It runs f in a separate goroutine
Expand All @@ -65,6 +65,9 @@ func (p *App) initApp(m *testing.M) {
p.m = m
}

// M returns the *testing.M object.
func (p App) M() *testing.M { return p.m }

// Gopt_App_TestMain is required by Go+ compiler as the entry of a Go+ testing project.
func Gopt_App_TestMain(app interface{ initApp(m *testing.M) }, m *testing.M) {
app.initApp(m)
Expand Down