debug_test.go 584 B

123456789101112131415161718192021222324
  1. // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
  2. // Use of this source code is governed by a MIT style
  3. // license that can be found in the LICENSE file.
  4. package gin
  5. import (
  6. "testing"
  7. "github.com/stretchr/testify/assert"
  8. )
  9. // TODO
  10. // func debugRoute(httpMethod, absolutePath string, handlers []HandlerFunc) {
  11. // func debugPrint(format string, values ...interface{}) {
  12. func TestIsDebugging(t *testing.T) {
  13. SetMode(DebugMode)
  14. assert.True(t, IsDebugging())
  15. SetMode(ReleaseMode)
  16. assert.False(t, IsDebugging())
  17. SetMode(TestMode)
  18. assert.False(t, IsDebugging())
  19. }