From 0ef3d6d5e127b192b111073687b0ad49dc43299d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20L=C3=B6nnblad?= Date: Sat, 20 Jun 2020 23:18:24 +0200 Subject: [PATCH] Deprecated SuiteContext and ConcurrentFormatter --- fmt.go | 3 +++ suite_context.go | 2 ++ suite_context_test.go | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/fmt.go b/fmt.go index 416dbac..5327d01 100644 --- a/fmt.go +++ b/fmt.go @@ -77,6 +77,9 @@ type Formatter interface { // ConcurrentFormatter is an interface for a Concurrent // version of the Formatter interface. +// +// Deprecated: The formatters need to handle concurrency +// instead of being copied and synchronized for each thread. type ConcurrentFormatter interface { Formatter Copy(ConcurrentFormatter) diff --git a/suite_context.go b/suite_context.go index f2b459c..94079c8 100644 --- a/suite_context.go +++ b/suite_context.go @@ -25,6 +25,8 @@ import ( // need this, rather it is provided for those developing add-on libraries for godog. // // For an example of how to use, see godog's own `features/` and `suite_test.go`. +// +// Deprecated: Use InitializeScenario instead. func SuiteContext(s *Suite, additionalContextInitializers ...func(suite *Suite)) { c := &suiteContext{ extraCIs: additionalContextInitializers, diff --git a/suite_context_test.go b/suite_context_test.go index c6112d7..507eb2d 100644 --- a/suite_context_test.go +++ b/suite_context_test.go @@ -16,6 +16,14 @@ import ( "github.com/stretchr/testify/assert" ) +// InitializeScenario provides steps for godog suite execution and +// can be used for meta-testing of godog features/steps themselves. +// +// Beware, steps or their definitions might change without backward +// compatibility guarantees. A typical user of the godog library should never +// need this, rather it is provided for those developing add-on libraries for godog. +// +// For an example of how to use, see godog's own `features/` and `suite_test.go`. func InitializeScenario(ctx *ScenarioContext) { tc := &godogFeaturesScenario{}