Skip to content

Commit 4a093fe

Browse files
committed
Simplify unit tests
1 parent 911919f commit 4a093fe

5 files changed

Lines changed: 306 additions & 592 deletions

File tree

.claude/agents/sqllin-test-writer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ You are an expert Kotlin test engineer specializing in database libraries and DS
4141
- Use in-memory databases or test databases for integration tests
4242
- Clean up database state between tests (transactions, rollbacks, or cleanup hooks)
4343
- Test SQL injection prevention and parameterized query handling
44+
- For both of sqllin-driver and sqllin-dsl, always change `JvmTest`, `NativeTest`, `AndroidTest` in the meantime
4445

4546
5. **DSL-Specific Testing Considerations**:
4647
- Verify that DSL constructs generate correct SQL

sqllin-dsl-test/src/androidInstrumentedTest/kotlin/com/ctrip/sqllin/dsl/test/AndroidTest.kt

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,7 @@ class AndroidTest {
6262
fun testNullValue() = commonTest.testNullValue()
6363

6464
@Test
65-
fun testCreateTableWithLongPrimaryKey() = commonTest.testCreateTableWithLongPrimaryKey()
66-
67-
@Test
68-
fun testCreateTableWithStringPrimaryKey() = commonTest.testCreateTableWithStringPrimaryKey()
69-
70-
@Test
71-
fun testCreateTableWithAutoincrement() = commonTest.testCreateTableWithAutoincrement()
72-
73-
@Test
74-
fun testCreateTableWithCompositePrimaryKey() = commonTest.testCreateTableWithCompositePrimaryKey()
65+
fun testPrimaryKeyVariations() = commonTest.testPrimaryKeyVariations()
7566

7667
@Test
7768
fun testInsertWithId() = commonTest.testInsertWithId()
@@ -83,70 +74,16 @@ class AndroidTest {
8374
fun testUpdateAndDeleteWithPrimaryKey() = commonTest.testUpdateAndDeleteWithPrimaryKey()
8475

8576
@Test
86-
fun testByteArrayInsert() = commonTest.testByteArrayInsert()
87-
88-
@Test
89-
fun testByteArraySelect() = commonTest.testByteArraySelect()
90-
91-
@Test
92-
fun testByteArrayUpdate() = commonTest.testByteArrayUpdate()
93-
94-
@Test
95-
fun testByteArrayDelete() = commonTest.testByteArrayDelete()
96-
97-
@Test
98-
fun testByteArrayMultipleOperations() = commonTest.testByteArrayMultipleOperations()
99-
100-
@Test
101-
fun testDropTable() = commonTest.testDropTable()
102-
103-
@Test
104-
fun testDropTableExtensionFunction() = commonTest.testDropTableExtensionFunction()
105-
106-
@Test
107-
fun testAlertAddColumn() = commonTest.testAlertAddColumn()
108-
109-
@Test
110-
fun testAlertRenameTableWithTableObject() = commonTest.testAlertRenameTableWithTableObject()
111-
112-
@Test
113-
fun testAlertRenameTableWithString() = commonTest.testAlertRenameTableWithString()
114-
115-
@Test
116-
fun testRenameColumnWithClauseElement() = commonTest.testRenameColumnWithClauseElement()
117-
118-
@Test
119-
fun testRenameColumnWithString() = commonTest.testRenameColumnWithString()
120-
121-
@Test
122-
fun testDropColumn() = commonTest.testDropColumn()
123-
124-
@Test
125-
fun testDropAndRecreateTable() = commonTest.testDropAndRecreateTable()
126-
127-
@Test
128-
fun testAlertOperationsInTransaction() = commonTest.testAlertOperationsInTransaction()
129-
130-
@Test
131-
fun testStringComparisonOperators() = commonTest.testStringComparisonOperators()
132-
133-
@Test
134-
fun testStringInOperator() = commonTest.testStringInOperator()
135-
136-
@Test
137-
fun testStringBetweenOperator() = commonTest.testStringBetweenOperator()
138-
139-
@Test
140-
fun testBlobComparisonOperators() = commonTest.testBlobComparisonOperators()
77+
fun testByteArrayAndBlobOperations() = commonTest.testByteArrayAndBlobOperations()
14178

14279
@Test
143-
fun testBlobInOperator() = commonTest.testBlobInOperator()
80+
fun testDropAndCreateTable() = commonTest.testDropAndCreateTable()
14481

14582
@Test
146-
fun testBlobBetweenOperator() = commonTest.testBlobBetweenOperator()
83+
fun testSchemaModification() = commonTest.testSchemaModification()
14784

14885
@Test
149-
fun testStringComparisonWithColumns() = commonTest.testStringComparisonWithColumns()
86+
fun testStringOperators() = commonTest.testStringOperators()
15087

15188
@Before
15289
fun setUp() {

0 commit comments

Comments
 (0)