<commit_before>﻿/*
 * Copyright (c) 2016 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using NUnit.Framework;

namespace org.herbal3d.convoar.tests {

    [TestFixture]
    public class ConvoarTestCase {
        // Documentation on attributes: http://www.nunit.org/index.php?p=attributes&r=2.6.1
        // Documentation on assertions: http://www.nunit.org/index.php?p=assertions&r=2.6.1

        [SetUp]
        public virtual void Setup() {
        }
    }

    // =========================================================================================
    [TestFixture]
    public class ParameterParsing : ConvoarTestCase {

        [TestFixtureSetUp]
        public void Init() {
        }

        [TestFixtureTearDown]
        public void TearDown() {
        }
    }

    // =========================================================================================
    // Verify that terrain mesh is generated across the whole region area.
    [TestFixture]
    public class TerrainMeshGeneration : ConvoarTestCase {

        [TestFixtureSetUp]
        public void Init() {
        }

        [TestFixtureTearDown]
        public void TearDown() {
        }

        [TestCase]
        public void VerifyHeightmapMatchesMesh() {
        }

        [TestCase]
        public void VerifyMeshCoversWholeRegion() {
        }
    }

    // =========================================================================================
    // Test whether the coordinates and child rotations happen properly when<commit_msg>Start filling out some of the tests. None working yet.<commit_after>/*
 * Copyright (c) 2016 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using org.herbal3d.convoar;

using NUnit.Framework;

namespace org.herbal3d.convoar.tests {

    [TestFixture]
    public class ConvoarTestCase {
        // Documentation on attributes: http://www.nunit.org/index.php?p=attributes&r=2.6.1
        // Documentation on assertions: http://www.nunit.org/index.php?p=assertions&r=2.6.1

        [SetUp]
        public virtual void Setup() {
        }
    }

    // =========================================================================================
    [TestFixture]
    public class ParameterParsing : ConvoarTestCase {

        [TestFixtureSetUp]
        public void Init() {
        }

        [TestFixtureTearDown]
        public void TearDown() {
        }
    }

    // =========================================================================================
    // Verify that terrain mesh is generated across the whole region area.
    [TestFixture]
    public class TerrainMeshGeneration : ConvoarTestCase {

        [TestFixtureSetUp]
        public void Init() {
        }

        [TestFixtureTearDown]
        public void TearDown() {
        }

        [TestCase]
        public void VerifyHeightmapMatchesMesh() {
        }

        [TestCase(100.0, 200.0)]
        public void VerifyMeshCoversWholeRegion(float pHeightmapSize, float pRegionSize) {
            int heightmapSize = (int)pHeightmapSize;
            int regionSize = (int)pRegionSize;
            float[,] heightMap = CreateHeightmap(heightmapSize);

            ExtendedPrimGroup epg = assetMesher.MeshFromHeightMap(heightMap, regionSize, regionSize);
        }

        // Creates a heightmap of specificed size with a simple gradient from on corner to the
        //    opposite corner.
        private float[,] CreateHeightmap(int pHeightmapSize) {
            float[,] heightmap = new float[pHeightmapSize, pHeightmapSize];
            int xSize = heightmap.GetLength(0);
            int ySize = heightmap.GetLength(1);
            float xStep = 1.0f / (float)xSize;
            float yStep = 1.0f / (float)ySize;
            for (int xx = 0; xx < xSize; xx++) {
                for (int yy = 0; yy < ySize; yy++) {
                    heightmap[xx, yy] = (xStep * (float)xx) + (yStep * (float)yy);
                }
            }
            return heightmap;
        }
    }

    // =========================================================================================
    // Test whether the coordinates and child rotations happen properly when
{'fraction_non_alphanumeric': 0.17959108491434886, 'fraction_numerical': 0.008657211272794254, 'mean_word_length': 2.731958762886598, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '2229439', 'n_tokens_mistral': 1454, 'n_tokens_neox': 1379, 'n_words': 428}