<commit_before>﻿using sdmap.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;

namespace sdmap.test.IntegratedTest
{
    public class NamespaceTest
    {
        [Fact]
        public void CanReferenceOtherInOneNamespace()
        {
            var code = "namespace ns{sql v1{1#include<v2>} sql v2{2}}";
            var rt = new SdmapRuntime();
            rt.AddSourceCode(code);
            var result = rt.Emit("ns.v1", new { A = true });
            Assert.Equal("12", result);
        }

        [Fact]
        public void CanCombineTwoNs()
        {
            var code = <commit_msg>Split another code.<commit_after>﻿using sdmap.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Xunit;

namespace sdmap.test.IntegratedTest
{
    public class NamespaceTest
    {
        [Fact]
        public void CanReferenceOtherInOneNamespace()
        {
            var code = 
                "namespace ns{sql v1{1#include<v2>} \r\n" + 
                "sql v2{2}}";
            var rt = new SdmapRuntime();
            rt.AddSourceCode(code);
            var result = rt.Emit("ns.v1", new { A = true });
            Assert.Equal("12", result);
        }

        [Fact]
        public void CanCombineTwoNs()
        {
            var code = 
{'fraction_non_alphanumeric': 0.10940919037199125, 'fraction_numerical': 0.011670313639679067, 'mean_word_length': 1.982608695652174, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5624196', 'n_tokens_mistral': 409, 'n_tokens_neox': 406, 'n_words': 97}