Skip to content

Commit b0c1706

Browse files
committed
AJ-703: add test case about tensor
1 parent 9effbf4 commit b0c1706

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/com/xxdb/DBConnectionTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,6 +2022,20 @@ public void testDecimal128MatrixUpload() throws Exception {
20222022
assertEquals(decimal128matrix2.getString(), decimal128matrix2Res.getString());
20232023
assertEquals("\n", decimal128matrix2Res.getString());
20242024
}
2025+
@Test
2026+
public void testTensorUpload() throws Exception {
2027+
HashMap<String, Entity> map = new HashMap<String, Entity>();
2028+
Entity bc = conn.run("tensor(100)");
2029+
map.put("tensor1", bc);
2030+
String re = null;
2031+
try{
2032+
conn.upload(map);
2033+
}catch(Exception ex){
2034+
re = ex.getMessage();
2035+
}
2036+
assertEquals("BasicTensor not support write method.", re);
2037+
}
2038+
20252039
@Test
20262040
public void testUserDefineFunction() throws IOException {
20272041
conn.run("def f(a,b) {return a+b};");

0 commit comments

Comments
 (0)