debug_test.go 438 B

1234567891011121314151617181920
  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. func TestIsDebugging(t *testing.T) {
  10. SetMode(DebugMode)
  11. assert.True(t, IsDebugging())
  12. SetMode(ReleaseMode)
  13. assert.False(t, IsDebugging())
  14. SetMode(TestMode)
  15. assert.False(t, IsDebugging())
  16. }