Skip to content

Commit

Permalink
Merge pull request #28 from AVSystem/deps-update
Browse files Browse the repository at this point in the history
Dependencies update: Scala commons, Guava, Scala Test
  • Loading branch information
sebaciv authored Sep 1, 2023
2 parents ba19d71 + f46eea3 commit 5764d6a
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 50 deletions.
10 changes: 4 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ inThisBuild(Seq(
val CompileAndTest = "compile->compile;test->test"

val parserCombinatorsVersion = "1.1.2"
val avsCommonsVersion = "2.10.0"
val avsCommonsVersion = "2.12.0"
val jettyVersion = "9.4.51.v20230217" // Tests only
val vaadinVersion = "6.8.18" // Tests only
val slf4jVersion = "1.7.36"
val logbackVersion = "1.4.4"
val commonsLang3Version = "3.12.0"
val commonsCodecVersion = "1.15"
val guavaVersion = "23.0"
val commonsNetVersion = "3.8.0"
val guavaVersion = "32.1.2-jre"
val commonsNetVersion = "3.9.0"
val jodaTimeVersion = "2.10.14"
val junitVersion = "4.13.2"
val scalatestVersion = "3.0.9"
val scalatestVersion = "3.2.16"

val noPublishSettings = Seq(
publish / skip := true
Expand Down Expand Up @@ -104,7 +103,6 @@ lazy val subprojectSettings = Seq(
})),
libraryDependencies ++= Seq(
compilerPlugin("com.avsystem.commons" %% "commons-analyzer" % avsCommonsVersion),
"junit" % "junit" % junitVersion % Test,
"org.scalatest" %% "scalatest" % scalatestVersion % Test
),
Compile / doc / sources := Seq.empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ package compiler

import java.util.concurrent.Callable
import java.{lang => jl, util => ju}

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

/**
* Created: 17-10-2013
* Author: ghik
*/
class ArbitraryCompilationTest extends FunSuite {
class ArbitraryCompilationTest extends AnyFunSuite {
val compiler = new DefaultScexCompiler(new ScexSettings)

test("arbitrary source code compilation test") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import com.avsystem.scex.presentation.SymbolAttributes
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import com.avsystem.scex.validation.{SymbolValidator, SyntaxValidator}
import com.avsystem.scex.{ExpressionProfile, NamedSource}
import org.scalatest.{FunSuite, BeforeAndAfter}
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.BeforeAndAfter

import scala.collection.mutable.ArrayBuffer
import scala.reflect.internal.util.SourceFile
Expand All @@ -16,7 +17,7 @@ import scala.tools.nsc.Global
* Created: 22-10-2014
* Author: ghik
*/
class ClassfileReusingTest extends FunSuite with BeforeAndAfter {
class ClassfileReusingTest extends AnyFunSuite with BeforeAndAfter {

trait ScexCompilerInterceptor extends InterceptingPluginScexCompiler {
val sourcesCompiled = new ArrayBuffer[SourceFile]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.avsystem.scex.compiler

import com.avsystem.scex.japi.{XmlFriendlyJavaScexCompiler, ScalaTypeTokens}
import com.avsystem.scex.util.{SimpleContext, PredefinedAccessSpecs}
import org.scalatest.FunSuite
import com.avsystem.scex.japi.{ScalaTypeTokens, XmlFriendlyJavaScexCompiler}
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import org.scalatest.funsuite.AnyFunSuite

/**
* Author: ghik
* Created: 26/10/15.
*/
class JavaScexCompilerTest extends FunSuite with CompilationTest {
class JavaScexCompilerTest extends AnyFunSuite with CompilationTest {
override protected def createCompiler = new XmlFriendlyJavaScexCompiler(new ScexSettings)

test("typed variables test") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.avsystem.scex
package compiler

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

class JavaTypeParsingTest extends FunSuite {
class JavaTypeParsingTest extends AnyFunSuite {

import com.avsystem.scex.compiler.JavaTypeParsing._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ package com.avsystem.scex
package compiler

import java.lang.annotation.RetentionPolicy

import com.avsystem.scex.compiler.ScexCompiler.CompilationFailedException
import com.avsystem.scex.compiler.TestUtils.CustomBooleanConversionRoot
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

/**
* Created: 04-04-2014
* Author: ghik
*/
class LiteralExpressionsTest extends FunSuite with CompilationTest {
class LiteralExpressionsTest extends AnyFunSuite with CompilationTest {

import com.avsystem.scex.validation.SymbolValidator._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.avsystem.scex.compiler

import com.avsystem.scex.parsing.ScalaParsingCommons
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

/**
* Created: 31-10-2014
* Author: ghik
*/
class ScalaParsingCommonsTest extends FunSuite {
class ScalaParsingCommonsTest extends AnyFunSuite {

import com.avsystem.scex.parsing.ScalaParsingCommons._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.avsystem.scex.compiler.ScexCompiler.CompilationFailedException
import com.avsystem.scex.compiler.overriding.{Base, Klass, Specialized}
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import com.google.common.reflect.TypeToken
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import java.{util => ju}
import scala.annotation.nowarn
Expand All @@ -19,7 +19,7 @@ object ScexCompilerTest {
}

@nowarn("msg=a pure expression does nothing in statement position")
class ScexCompilerTest extends FunSuite with CompilationTest {
class ScexCompilerTest extends AnyFunSuite with CompilationTest {

import com.avsystem.scex.validation.SymbolValidator._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.avsystem.commons.misc.TypeString
import com.avsystem.scex.compiler.ScexCompiler.{CompilationFailedException, CompileError}
import com.avsystem.scex.compiler.TemplateInterpolations.Splicer
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import scala.annotation.nowarn
import scala.reflect.ClassTag
Expand Down Expand Up @@ -41,7 +41,7 @@ object CustomBooleanSplicer {
* Author: ghik
*/
@nowarn("msg=a pure expression does nothing in statement position")
class SetterExpressionsTest extends FunSuite with CompilationTest {
class SetterExpressionsTest extends AnyFunSuite with CompilationTest {

import com.avsystem.scex.validation.SymbolValidator._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package com.avsystem.scex
package compiler

import com.avsystem.scex.parsing.{Binding, ShiftInfo, ShiftInfoPositionMapping}
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import scala.collection.immutable.SortedMap

/**
* Created: 24-10-2013
* Author: ghik
*/
class ShiftInfoPositionMappingTest extends FunSuite {
class ShiftInfoPositionMappingTest extends AnyFunSuite {
test("empty mapping test") {
val mapping = new ShiftInfoPositionMapping(SortedMap.empty, SortedMap.empty)
val reverse = mapping.reverse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.lang.annotation.RetentionPolicy
import java.{lang => jl}
import com.avsystem.scex.compiler.ScexCompiler.CompilationFailedException
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import scala.annotation.nowarn

Expand All @@ -14,7 +14,7 @@ import scala.annotation.nowarn
* Author: ghik
*/
@nowarn("msg=a pure expression does nothing in statement position")
class TemplateExpressionsTest extends FunSuite with CompilationTest {
class TemplateExpressionsTest extends AnyFunSuite with CompilationTest {

import com.avsystem.scex.validation.SymbolValidator._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package com.avsystem.scex.compiler
import com.avsystem.scex.compiler.xmlfriendly.XmlFriendlyTranslator
import com.avsystem.scex.parsing.TemplateParser
import com.google.common.io.ByteStreams
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

/**
* Created: 03-11-2014
* Author: ghik
*/
class TemplateParserTest extends FunSuite {
class TemplateParserTest extends AnyFunSuite {
def parse(expr: String): (List[String], List[String]) = {
val (parts, args) = TemplateParser.parseTemplate(expr).get
(parts, args.map(_.result))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import com.avsystem.scex.compiler.ScexCompiler.CompilationFailedException
import com.avsystem.scex.presentation.SymbolAttributes
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import com.avsystem.scex.validation.{SymbolValidator, SyntaxValidator}
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

/**
* Created: 20-11-2013
* Author: ghik
*/
class TypesafeEqualsTest extends FunSuite with CompilationTest {
class TypesafeEqualsTest extends AnyFunSuite with CompilationTest {

import com.avsystem.scex.validation.SymbolValidator._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.avsystem.scex.compiler.{CompilationTest, JavaRootWithGetter}
import com.avsystem.scex.presentation.Attributes
import com.avsystem.scex.presentation.annotation.Documentation
import com.avsystem.scex.util.SimpleContext
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import scala.annotation.nowarn

Expand All @@ -15,7 +15,7 @@ import scala.annotation.nowarn
* Created: 11/18/14.
*/
@nowarn("msg=a pure expression does nothing in statement position")
class ScopeAndTypeCompletionTest extends FunSuite with CompilationTest with CompletionTest {
class ScopeAndTypeCompletionTest extends AnyFunSuite with CompilationTest with CompletionTest {

import com.avsystem.scex.util.CommonUtils._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.avsystem.scex.compiler.presentation.TypeCompletionPrefixTest._
import com.avsystem.scex.compiler.presentation.ast.EmptyTree
import com.avsystem.scex.util.SimpleContext
import org.scalactic.source.Position
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import scala.annotation.nowarn

Expand All @@ -16,7 +16,7 @@ import scala.annotation.nowarn
* Author: ghik
*/
@nowarn("msg=a pure expression does nothing in statement position")
class TypeCompletionPrefixTest extends FunSuite with CompilationTest with CompletionTest {
class TypeCompletionPrefixTest extends AnyFunSuite with CompilationTest with CompletionTest {

import com.avsystem.scex.validation.SymbolValidator._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package com.avsystem.scex
package compiler.xmlfriendly

import com.avsystem.scex.parsing.{Binding, Modification, PString, ShiftInfo}
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import scala.collection.immutable.SortedMap

/**
* Created: 25-10-2013
* Author: ghik
*/
class PStringTest extends FunSuite {
class PStringTest extends AnyFunSuite {
def test(name: String)(modifications: Modification*)
(shiftMapping: (Int, ShiftInfo)*)(reverseShiftMapping: (Int, ShiftInfo)*): Unit = super.test(name) {
val (actualShiftMapping, actualReverseShiftMapping) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import com.avsystem.scex.compiler.{ClassTaggedContext, CompilationTest, ScexSett
import com.avsystem.scex.japi.XmlFriendlyJavaScexCompiler
import com.avsystem.scex.util.{PredefinedAccessSpecs, SimpleContext}
import com.avsystem.scex.validation.SymbolValidator._
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import scala.reflect.{ClassTag, classTag}

/**
* Created: 17-09-2013
* Author: ghik
*/
class XmlFriendlyCompilerTest extends FunSuite with CompilationTest {
class XmlFriendlyCompilerTest extends AnyFunSuite with CompilationTest {

override protected def createCompiler = new XmlFriendlyJavaScexCompiler(new ScexSettings)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package com.avsystem.scex
package compiler.xmlfriendly

import com.google.common.io.ByteStreams
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

/**
* Created: 23-04-2014
* Author: ghik
*/
class XmlFriendlyTranslatorTest extends FunSuite {
class XmlFriendlyTranslatorTest extends AnyFunSuite {

import com.avsystem.scex.compiler.xmlfriendly.XmlFriendlyTranslator.translate

Expand Down
3 changes: 1 addition & 2 deletions scex-util/src/main/scala/com/avsystem/scex/util/Bytes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package com.avsystem.scex.util

import java.io.UnsupportedEncodingException
import java.nio.charset.StandardCharsets

import com.avsystem.commons.jiop.JavaInterop._
import com.avsystem.scex.presentation.annotation.Documentation
import org.apache.commons.codec.binary.{Base64, Hex}

import scala.collection.compat.immutable.ArraySeq
import scala.collection.immutable.ArraySeq
import scala.util.hashing.MurmurHash3

final class Bytes(val bytes: Array[Byte]) extends Comparable[Bytes] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package com.avsystem.scex.util

import java.util.{Calendar, Date}

import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

class EnrichedDateTest extends FunSuite {
class EnrichedDateTest extends AnyFunSuite {
// 2019-04-17 12:55:14.456 UTC
val testDate: EnrichedDate = new EnrichedDate(new Date(1555505714456L))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package com.avsystem.scex.util
import com.avsystem.commons.JDate
import com.avsystem.scex.util.CommonExpressionUtils._
import com.avsystem.scex.util.JavaCollectionExtensions._
import org.scalatest.FunSuite
import org.scalatest.funsuite.AnyFunSuite

import java.text.ParseException
import java.{util => ju}

class QmarkTest extends FunSuite {
class QmarkTest extends AnyFunSuite {
test("recover from NullPointerException") {
def expression = (null: String).length

Expand Down

0 comments on commit 5764d6a

Please sign in to comment.