瀏覽代碼

Fixed some typos and gave a test a better name

Ben Hood 11 年之前
父節點
當前提交
fd4c545aed
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      cassandra_test.go

+ 7 - 7
cassandra_test.go

@@ -308,7 +308,7 @@ func TestBatchLimit(t *testing.T) {
 }
 
 // TestTooManyQueryArgs tests to make sure the library correctly handles the application level bug
-// whereby the too few query arguments are passed to a query
+// whereby too many query arguments are passed to a query
 func TestTooManyQueryArgs(t *testing.T) {
 	session := createSession(t)
 	defer session.Close()
@@ -328,20 +328,20 @@ func TestTooManyQueryArgs(t *testing.T) {
 	}
 }
 
-// TestTooFewQueryArgs tests to make sure the library correctly handles the application level bug
-// whereby the too few query arguments are passed to a query
-func TestTooFewQueryArgs(t *testing.T) {
+// TestNotEnoughQueryArgs tests to make sure the library correctly handles the application level bug
+// whereby not enough query arguments are passed to a query
+func TestNotEnoughQueryArgs(t *testing.T) {
 	session := createSession(t)
 	defer session.Close()
 
-	if err := session.Query(`CREATE TABLE too_few_query_args (id int, cluster int, value int, primary key (id, cluster))`).Exec(); err != nil {
+	if err := session.Query(`CREATE TABLE not_enough_query_args (id int, cluster int, value int, primary key (id, cluster))`).Exec(); err != nil {
 		t.Fatal("create table:", err)
 	}
 
-	_, err := session.Query(`SELECT * FROM too_few_query_args WHERE id = ? and cluster = ?`, 1).Iter().SliceMap()
+	_, err := session.Query(`SELECT * FROM not_enough_query_args WHERE id = ? and cluster = ?`, 1).Iter().SliceMap()
 
 	if err == nil {
-		t.Fatal("'`SELECT * FROM too_few_query_args WHERE id = ? and cluster = ?`, 1' should return an ErrQueryArgLength")
+		t.Fatal("'`SELECT * FROM not_enough_query_args WHERE id = ? and cluster = ?`, 1' should return an ErrQueryArgLength")
 	}
 
 	if err != ErrQueryArgLength {