Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: onsi/ginkgo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.16.2
Choose a base ref
...
head repository: onsi/ginkgo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.16.3
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on May 29, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    alexanderniebuhr Alexander Niebuhr
    Copy the full SHA
    e91d894 View commit details
  2. v1.16.3

    onsi committed May 29, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3286b30 View commit details
Showing with 12 additions and 3 deletions.
  1. +5 −0 CHANGELOG.md
  2. +1 −1 config/config.go
  3. +4 −0 ginkgo_dsl.go
  4. +2 −2 types/deprecation_support.go
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.16.3

### Features
- Measure is now deprecated and emits a deprecation warning.

## 1.16.2

### Fixes
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import (
"fmt"
)

const VERSION = "1.16.2"
const VERSION = "1.16.3"

type GinkgoConfigType struct {
RandomSeed int64
4 changes: 4 additions & 0 deletions ginkgo_dsl.go
Original file line number Diff line number Diff line change
@@ -473,24 +473,28 @@ func By(text string, callbacks ...func()) {
//The body function must have the signature:
// func(b Benchmarker)
func Measure(text string, body interface{}, samples int) bool {
deprecationTracker.TrackDeprecation(types.Deprecations.Measure(), codelocation.New(1))
global.Suite.PushMeasureNode(text, body, types.FlagTypeNone, codelocation.New(1), samples)
return true
}

//You can focus individual Measures using FMeasure
func FMeasure(text string, body interface{}, samples int) bool {
deprecationTracker.TrackDeprecation(types.Deprecations.Measure(), codelocation.New(1))
global.Suite.PushMeasureNode(text, body, types.FlagTypeFocused, codelocation.New(1), samples)
return true
}

//You can mark Measurements as pending using PMeasure
func PMeasure(text string, _ ...interface{}) bool {
deprecationTracker.TrackDeprecation(types.Deprecations.Measure(), codelocation.New(1))
global.Suite.PushMeasureNode(text, func(b Benchmarker) {}, types.FlagTypePending, codelocation.New(1), 0)
return true
}

//You can mark Measurements as pending using XMeasure
func XMeasure(text string, _ ...interface{}) bool {
deprecationTracker.TrackDeprecation(types.Deprecations.Measure(), codelocation.New(1))
global.Suite.PushMeasureNode(text, func(b Benchmarker) {}, types.FlagTypePending, codelocation.New(1), 0)
return true
}
4 changes: 2 additions & 2 deletions types/deprecation_support.go
Original file line number Diff line number Diff line change
@@ -46,9 +46,9 @@ func (d deprecations) Async() Deprecation {

func (d deprecations) Measure() Deprecation {
return Deprecation{
Message: "Measure is deprecated in Ginkgo V2",
Message: "Measure is deprecated and will be removed in Ginkgo V2. Please migrate to gomega/gmeasure.",
DocLink: "removed-measure",
Version: "1.16.0",
Version: "1.16.3",
}
}