<commit_before>﻿//
// Copyright (c) XSharp B.V.  All Rights Reserved.
// Licensed under the Apache License, Version 2.0.
// See License.txt in the project root for license information.
//
USING System
USING System.Collections.Generic
USING System.Linq
USING System.Text
USING XUnit

using System.Diagnostics

// Array tests are not working correctly yet with the current build
BEGIN NAMESPACE XSharp.VFP.Tests

	CLASS TypeTests
		STATIC CONSTRUCTOR
        RegisterFoxMemVarSupport()
        XSharp.RuntimeState.Dialect := XSharpDialect.FoxPro

		[Fact, Trait("Category", "Types")];
		METHOD VarTypeTests() AS VOID
            DIMENSION a[10]
            XSharp.RuntimeState.CompilerOptionFox2 := TRUE
            a = 123 // fill the array

            ? VarType ( a ) , VarType ( a[10] )
            ?
            Assert.Equal("N", VarType ( a ))
            Assert.Equal("N", VarType ( a[10]))


            a = "text"

            ? VarType ( a ) , VarType ( a[10] )
            ?<commit_msg>[Tests] Make sure USUAL is initialized for FoxPro when VFP test runs<commit_after>﻿//
// Copyright (c) XSharp B.V.  All Rights Reserved.
// Licensed under the Apache License, Version 2.0.
// See License.txt in the project root for license information.
//
USING System
USING System.Collections.Generic
USING System.Linq
USING System.Text
USING XUnit

using System.Diagnostics

// Array tests are not working correctly yet with the current build
BEGIN NAMESPACE XSharp.VFP.Tests

	CLASS TypeTests
		STATIC CONSTRUCTOR
        RegisterFoxMemVarSupport()
        XSharp.RuntimeState.Dialect := XSharpDialect.FoxPro

		[Fact, Trait("Category", "Types")];
		METHOD VarTypeTests() AS VOID
            DIMENSION a[10]
            XSharp.RuntimeState.Dialect := XSharpDialect.FoxPro
            XSharp.RuntimeState.CompilerOptionFox2 := TRUE
            a = 123 // fill the array

            ? VarType ( a ) , VarType ( a[10] )
            ?
            Assert.Equal("N", VarType ( a ))
            Assert.Equal("N", VarType ( a[10]))


            a = "text"

            ? VarType ( a ) , VarType ( a[10] )
            ?
{'fraction_non_alphanumeric': 0.0990990990990991, 'fraction_numerical': 0.013276434329065908, 'mean_word_length': 2.32807570977918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '4996224', 'n_tokens_mistral': 672, 'n_tokens_neox': 617, 'n_words': 191}