◐ Shell
reader mode source ↗
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Expectation extends AbstractModel {
def getFailureText() {
return '''
«message.trim»
«caller.trim»
'''.toString.trim
}

Expand All @@ -38,10 +38,12 @@ class Expectation extends AbstractModel {

def getCallerLine() {
var Integer line = null
val p = Pattern.compile("(?i)\"[^\\\"]+\",\\s+line\\s*([0-9]+)")
val m = p.matcher(caller)
if (m.find) {
line = Integer.valueOf(m.group(1))
}
return line
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import org.utplsql.sqldev.dal.UtplsqlDao
import org.utplsql.sqldev.model.LimitedLinkedHashMap
import org.utplsql.sqldev.model.preference.PreferenceModel
import org.utplsql.sqldev.model.runner.Run
import org.utplsql.sqldev.parser.UtplsqlParser
import org.utplsql.sqldev.resources.UtplsqlResources
import org.utplsql.sqldev.runner.UtplsqlRunner
Expand Down @@ -248,17 +249,21 @@ class RunnerPanel implements ActionListener, MouseListener, HyperlinkListener {
}
sorter.rowFilter = filter
}

private def openSelectedTest() {
val rowIndex = testOverviewTable.selectedRow
if (rowIndex != -1) {
val row = testOverviewTable.convertRowIndexToModel(rowIndex)
val test = testOverviewTableModel.getTest(row)
val dao = new UtplsqlDao(Connections.instance.getConnection(currentRun.connectionName))
val source = dao.getSource(test.ownerName, "PACKAGE", test.objectName.toUpperCase).trim
val parser = new UtplsqlParser(source)
val line = parser.getLineOf(test.procedureName)
openEditor(test.ownerName, "PACKAGE", test.objectName.toUpperCase, line, 1)
}
}

Expand All @@ -268,7 +273,12 @@ class RunnerPanel implements ActionListener, MouseListener, HyperlinkListener {
val row = failuresTable.convertRowIndexToModel(rowIndex)
val expectation = failuresTableModel.getExpectation(row)
val test = testOverviewTableModel.getTest(testOverviewTable.convertRowIndexToModel(testOverviewTable.selectedRow))
openEditor(test.ownerName, "PACKAGE BODY", test.objectName.toUpperCase, expectation.callerLine, 1)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,11 @@ class DalTest extends AbstractJdbcTest {
Assert.assertEquals("SCOTT:a", actual.get("SCOTT:a.b"))
Assert.assertEquals("SCOTT:a.b", actual.get("SCOTT:a.b.c"))
Assert.assertEquals("SCOTT:a.b.c", actual.get("SCOTT:a.b.c.junit_utplsql_test_pkg"))
Assert.assertEquals("SCOTT:a.b.c.junit_utplsql_test_pkg", actual.get("SCOTT:a.b.c.junit_utplsql_test_pkg.myContext"))
Assert.assertEquals("SCOTT:a.b.c.junit_utplsql_test_pkg", actual.get("SCOTT:a.b.c.junit_utplsql_test_pkg.t0"))
Assert.assertEquals("SCOTT:a.b.c.junit_utplsql_test_pkg", actual.get("SCOTT:a.b.c.junit_utplsql_test_pkg.t3"))
Assert.assertEquals("SCOTT:a.b.c.junit_utplsql_test_pkg.myContext", actual.get("SCOTT:a.b.c.junit_utplsql_test_pkg.myContext.t1"))
Assert.assertEquals("SCOTT:a.b.c.junit_utplsql_test_pkg.myContext", actual.get("SCOTT:a.b.c.junit_utplsql_test_pkg.myContext.t2"))
}

@Test
Expand Down Expand Up @@ -489,7 +489,7 @@ class DalTest extends AbstractJdbcTest {
val actualEmpty = dao.includes('SCOTT', 'TEST_F1')
Assert.assertEquals(#[], actualEmpty)
val actual = dao.includes('SCOTT', 'junit_utplsql_test_pkg')
Assert.assertEquals(#['SCOTT.JUNIT_UTPLSQL_TEST_PKG','SCOTT.JUNIT_F','UT3_LATEST_RELEASE.UT_EXPECTATION'].sort, actual.sort)
}

@Test
Expand Down
Toggle all file notes Toggle all file annotations