<commit_before><?xml version="1.0" ?>
<job id="test_stdlib_Sort">
<script language="VBScript" src="../stdlib.vbs" />
<script language="VBScript" src="../unittest.vbs" />
<script language="VBScript"><![CDATA[

Option Explicit

UnitTest_Description "stdlib.vbs: Sort function test."

Sub TestSwapArrayItem_ValueAndValue
  Dim a(1)
  a(0) = "foo"
  a(1) = "bar"
  SwapArrayItem a, 0, 1
  AssertEqual "bar", a(0)
  AssertEqual "foo", a(1)
End Sub
UnitTest_TestCase "TestSwapArrayItem_ValueAndValue"

Sub TestSwapArrayItem_ValueAndObject
  Dim a(1)
  Dim obj: Set obj = CreateObject("Scripting.Dictionary")
  a(0) = "foo"
  Set a(1) = obj
  SwapArrayItem a, 0, 1
  AssertSame obj, a(0)
  AssertEqual "foo", a(1)
End Sub
UnitTest_TestCase "TestSwapArrayItem_ValueAndObject"

Sub TestSwapArrayItem_ObjectAndObject
  Dim a(1)
  Dim obj1: Set obj1 = CreateObject("Scripting.Dictionary")
  Dim obj2: Set obj2 = CreateObject("Scripting.Dictionary")
  Set a(0) = obj1
  Set a(1) = obj2
  SwapArrayItem a, 0, 1
  AssertSame obj2, a(0)
  AssertSame obj1, a(1)
End Sub
UnitTest_TestCase "TestSwapArrayItem_ObjectAndObject"

Sub TestNumberCompare_Equal
  Dim comp: Set comp = New NumberCompare
  Assert comp(1, 1) = 0
End Sub
UnitTest_TestCase "TestNumberCompare_Equal"

Sub TestNumberCompare_Greater
  Dim comp: Set comp = New NumberCompare
  Assert comp(2, 1) > 0
End Sub
UnitTest_TestCase "TestNumberCompare_Greater"

Sub TestNumberCompare_Less
  Dim comp: Set comp = New NumberCompare
  Assert comp(1, 2) < 0<commit_msg>*** empty log message ***<commit_after><?xml version="1.0" ?>
<job id="test_stdlib_Sort">
<script language="VBScript" src="../stdlib.vbs" />
<script language="VBScript" src="../unittest.vbs" />
<script language="VBScript"><![CDATA[

Option Explicit

UnitTest_Description "stdlib.vbs: Sort function test."

Sub TestSwapArrayItem_ValueAndValue
  Dim a(1)
  a(0) = "foo"
  a(1) = "bar"
  SwapArrayItem a, 0, 1
  AssertEqual "bar", a(0)
  AssertEqual "foo", a(1)
End Sub
UnitTest_TestCase "TestSwapArrayItem_ValueAndValue"

Sub TestSwapArrayItem_ObjectAndObject
  Dim a(1)
  Dim obj1: Set obj1 = CreateObject("Scripting.Dictionary")
  Dim obj2: Set obj2 = CreateObject("Scripting.Dictionary")
  Set a(0) = obj1
  Set a(1) = obj2
  SwapArrayItem a, 0, 1
  AssertSame obj2, a(0)
  AssertSame obj1, a(1)
End Sub
UnitTest_TestCase "TestSwapArrayItem_ObjectAndObject"

Sub TestNumberCompare_Equal
  Dim comp: Set comp = New NumberCompare
  Assert comp(1, 1) = 0
End Sub
UnitTest_TestCase "TestNumberCompare_Equal"

Sub TestNumberCompare_Greater
  Dim comp: Set comp = New NumberCompare
  Assert comp(2, 1) > 0
End Sub
UnitTest_TestCase "TestNumberCompare_Greater"

Sub TestNumberCompare_Less
  Dim comp: Set comp = New NumberCompare
  Assert comp(1, 2) < 0
{'fraction_non_alphanumeric': 0.11143375680580762, 'fraction_numerical': 0.026497277676951, 'mean_word_length': 5.235294117647059, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 2, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2942108', 'n_tokens_mistral': 1004, 'n_tokens_neox': 981, 'n_words': 269}