Skip to content

Commit

Permalink
Fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bgaidioz committed Oct 30, 2024
1 parent 6ce2469 commit d2242f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ package com.rawlabs.snapi.compiler.tests.regressions
import com.rawlabs.snapi.compiler.tests.SnapiTestContext

class RD5775Test extends SnapiTestContext {
test("""let data = Http.Get("https://jira.atlassian.com/rest/api/latest/search", args=[{"jql", "fixVersion=9.0.0"}]),
| r = Json.InferAndRead(data),
| issues = Collection.Transform(r.issues, i -> {
| i.key, i.fields.summary, i.fields.status.name, i.fields.created, i.fields.resolutiondate
| })
|in Collection.OrderBy(issues, i -> i.resolutiondate, "DESC")
|""".stripMargin)(_ should run)

test("Collection")(_ should (tipe and runErrorAs("unsupported type")))
test("Collection.GroupBy")(_ should (tipe and runErrorAs("unsupported type")))
test("""Http.Get("http://www.raw-labs.com/not-found")""")(_ should (tipe and runErrorAs("unsupported type")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import com.rawlabs.snapi.compiler.tests.SnapiTestContext

class RD9485Test extends SnapiTestContext {

property("raw.snapi.frontend.inferrer.local.xml.sample-size", "2")

val xmlList = tempFile("""<?xml version="1.0" encoding="UTF-8"?>
|<top>
| <a>1</a>
Expand All @@ -26,7 +24,7 @@ class RD9485Test extends SnapiTestContext {
| <a/>
|</top>""".stripMargin)

test(s"""Xml.InferAndRead("file://$xmlList")""") { it =>
test(s"""Xml.InferAndRead("file://$xmlList", sampleSize = 2)""") { it =>
it should evaluateTo(s"""Xml.Read("file://$xmlList", type record(a: collection(double)))""")
it should evaluateTo("""{
| a: [
Expand All @@ -39,7 +37,7 @@ class RD9485Test extends SnapiTestContext {
|""".stripMargin)
}

test(s"""Xml.InferAndRead("file://$xmlList", preferNulls=false)""") { it =>
test(s"""Xml.InferAndRead("file://$xmlList", sampleSize = 2, preferNulls=false)""") { it =>
it should evaluateTo("""{
| a: [
| 1.0,
Expand Down Expand Up @@ -68,7 +66,7 @@ class RD9485Test extends SnapiTestContext {
| <a arg1="where is the other one?"></a>
|</top>""".stripMargin)

test(s"""Xml.InferAndRead("file://$xmlRecords")""") { it =>
test(s"""Xml.InferAndRead("file://$xmlRecords", sampleSize = 2)""") { it =>
it should evaluateTo("""{
| a: [
| {
Expand Down Expand Up @@ -100,7 +98,7 @@ class RD9485Test extends SnapiTestContext {
|""".stripMargin)
}

test(s"""Xml.InferAndRead("file://$xmlRecords", preferNulls=false)""") { it =>
test(s"""Xml.InferAndRead("file://$xmlRecords", sampleSize = 2, preferNulls=false)""") { it =>
it should evaluateTo("""{
| a: [
| {
Expand Down

0 comments on commit d2242f0

Please sign in to comment.