Skip to content

Commit

Permalink
minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
almibe committed May 10, 2024
1 parent 60a4998 commit 6321031
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ abstract class LigatureTestSuite extends FunSuite {
}
)

// runExternalTests(setup)

setup.test("create and close store") { instance =>
assertEquals(instance.allDatasets().toList, List())
}
Expand Down Expand Up @@ -385,3 +387,40 @@ abstract class LigatureTestSuite extends FunSuite {
// // }
// // }
}

// def runExternalTests(setup: TestSetup) = {
// sys.env.get("WANDER_TEST_SUITE") match {
// case Some(dir) =>
// val files = File(dir).listFiles
// .filter(_.isFile)
// .filter(_.getName.endsWith(".test.wander"))
// .map(_.getPath)
// .toList
// files.foreach { f =>
// //val script = Source.fromFile(f).mkString
// //val library = DirectoryLibrary(Path.of(dir))
// run(script, std(List())) match {
// case Left(err) => fail(f.toString() + err.toString())
// case Right((results, _)) =>
// evaluateResults(results, f)
// }
// }
// case None => ()
// }

// def evaluateResults(results: BendValue, fileName: String) =
// results match
// case WanderValue.Array(tests) =>
// tests.foreach { currentTest =>
// currentTest match
// case WanderValue.Module(values) =>
// test(values(Field("name")).toString) {
// val test = values(Field("test"))
// val expected = values(Field("expect"))
// assertEquals(test, expected)
// }
// case _ => ???
// }
// case _ =>
// throw RuntimeException(s"In $fileName -- Expected result to be array got ${results}")
// }
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import com.typesafe.scalalogging.Logger
import dev.ligature.bend.modules.*
import dev.ligature.inmemory.LigatureInMemory
import dev.ligature.Ligature
import dev.ligature.xodus.createXodusLigature
import java.nio.file.Paths

private class LigatureZeroMQ(val port: Int, ligature: Ligature)
extends Runnable
Expand Down Expand Up @@ -66,6 +64,5 @@ def runServer(port: Int): AutoCloseable = {
}

@main def main =
val home = System.getProperty("user.home")
val server = LigatureZeroMQ(4200, createXodusLigature(Paths.get(home, ".ligature", "xodus")))
val server = LigatureZeroMQ(4200, LigatureInMemory())
server.run()

0 comments on commit 6321031

Please sign in to comment.