about summary refs log tree commit diff stats
path: root/view.c
diff options
context:
space:
mode:
authorarg@mmvi <unknown>2006-09-25 08:21:51 +0200
committerarg@mmvi <unknown>2006-09-25 08:21:51 +0200
commit6b25d06d7d159bf89d740847fedc876ab0137b6b (patch)
tree49f46f104acb96c49eda4ae0f30415011ee57bf6 /view.c
parentcff951c65086950eeef5723b65dc06cbe7cdfa19 (diff)
downloaddwm-6b25d06d7d159bf89d740847fedc876ab0137b6b.tar.gz
applied Jukkas patch
Diffstat (limited to 'view.c')
-rw-r--r--view.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/view.c b/view.c
index ab1924a..44c0b30 100644
--- a/view.c
+++ b/view.c
@@ -7,7 +7,7 @@
 /* static */
 
 static Client *
-minclient() {
+minclient(void) {
 	Client *c, *min;
 
 	if((clients && clients->isfloat) || arrange == dofloat)
@@ -25,7 +25,7 @@ nexttiled(Client *c) {
 }
 
 static void
-reorder() {
+reorder(void) {
 	Client *c, *newclients, *tail;
 
 	newclients = tail = NULL;
@@ -225,7 +225,7 @@ resizecol(Arg *arg) {
 }
 
 void
-restack() {
+restack(void) {
 	Client *c;
 	XEvent ev;
 
Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
package svc // import "github.com/getwtxt/getwtxt/svc"

import (
	"errors"
	"net/http"
	"net/http/httptest"
	"testing"
)

func Test_log400(t *testing.T) {
	initTestConf()
	t.Run("log400", func(t *testing.T) {
		w := httptest.NewRecorder()
		req := httptest.NewRequest("POST", "/400", nil)
		log400(w, req, "400 Test")
		resp := w.Result()
		if resp.StatusCode != http.StatusBadRequest {
			t.Errorf("Didn't receive 400, received: %v\n", resp.StatusCode)
		}
	})
}

func Test_log404(t *testing.T) {
	initTestConf()
	t.Run("log404", func(t *testing.T) {
		w := httptest.NewRecorder()
		req := httptest.NewRequest("GET", "/404", nil)
		log404(w, req, errors.New("404 Test"))
		resp := w.Result()
		if resp.StatusCode != http.StatusNotFound {
			t.Errorf("Didn't receive 404, received: %v\n", resp.StatusCode)
		}
	})
}

func Test_log500(t *testing.T) {
	initTestConf()
	t.Run("log500", func(t *testing.T) {
		w := httptest.NewRecorder()
		req := httptest.NewRequest("POST", "/500", nil)
		log500(w, req, errors.New("500 Test"))
		resp := w.Result()
		if resp.StatusCode != http.StatusInternalServerError {
			t.Errorf("Didn't receive 500, received: %v\n", resp.StatusCode)
		}
	})
}