rooibos-roku 4.5.1 → 4.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -368,7 +368,7 @@ namespace rooibos
368
368
  if value = invalid
369
369
  if msg = ""
370
370
  expr_as_string = Rooibos.Common.asString(value)
371
- msg = expr_as_string + " = Invalid"
371
+ msg = "Expected value, got invalid"
372
372
  end if
373
373
  m.currentResult.fail(msg, m.currentAssertLineNumber)
374
374
  return false
@@ -595,17 +595,8 @@ namespace rooibos.Common
595
595
  return false
596
596
  end if
597
597
 
598
- if val1Type = "roString" or val1Type = "String"
599
- Value1 = Rooibos.Common.asString(Value1)
600
- else
601
- Value1 = box(Value1)
602
- end if
603
-
604
- if val2Type = "roString" or val2Type = "String"
605
- Value2 = Rooibos.Common.asString(Value2)
606
- else
607
- Value2 = box(Value2)
608
- end if
598
+ v1IsString = val1Type = "roString" or val1Type = "String"
599
+ v2IsString = val2Type = "roString" or val2Type = "String"
609
600
  'update types after boxing
610
601
  val1Type = type(Value1)
611
602
  val2Type = type(Value2)
@@ -613,12 +604,12 @@ namespace rooibos.Common
613
604
 
614
605
  'Upcast int to float, if other is float
615
606
  if val1Type = "roFloat" and val2Type = "roInt"
616
- Value2 = box(Cdbl(Value2))
607
+ Value2 = cdbl(Value2)
617
608
  else if val2Type = "roFloat" and val1Type = "roInt"
618
- Value1 = box(Cdbl(Value1))
609
+ Value1 = cdbl(Value1)
619
610
  end if
620
611
 
621
- if val1Type <> val2Type
612
+ if val1Type <> val2Type and v1IsString <> v2IsString
622
613
  return false
623
614
  else
624
615
  valtype = val1Type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rooibos-roku",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
4
4
  "description": "simple, flexible, fun brightscript test framework for roku scenegraph apps - roku brighterscript plugin",
5
5
  "repository": {
6
6
  "type": "git",