<commit_before>//
//  CariocaIndicatorViewTests.swift
//  CariocaMenu
//
//  Created by <NAME> on 26/11/2017.
//  Copyright © 2017 CariocaMenu. All rights reserved.
//

import Foundation
import XCTest
import CariocaMenu

class CariocaIndicatorViewTests: XCTestCase {

	let hostWidth: CGFloat = 375.0
	let indicatorWidth: CGFloat = 50.0
	var edge: UIRectEdge = .left
	var borderMargin: CGFloat = 5.0
	var bouncingValues: BouncingValues = (from: 15.0, to: 5.0)
	var startInset: CGFloat = 0.0
	var endInset: CGFloat = 0.0

    func testPositionsCalculationLeft() {
        //Given
		startInset = 0.0
		endInset = 0.0
		edge = .left
		//When
		let positions = calculatePositions()
        //Then
		XCTAssertEqual(positions.start, -167.5)
		XCTAssertEqual(positions.startBounce.from, -182.5)
		XCTAssertEqual(positions.startBounce.to, -162.5)
		XCTAssertEqual(positions.end.from, 177.5)
//		XCTAssertEqual(positions.end.to, 245.0)
//		XCTAssertEqual(positions.hidingConstant, 100.0)
    }

	func testPositionsCalculationRight() {
		//Given
		startInset = 0.0
		endInset = 0.0
		edge = .right
		//When
		let positions = calculatePositions()
		//Then
		XCTAssertEqual(positions.start, 167.5)
		XCTAssertEqual(positions.startBounce.from, 182.5)
		XCTAssertEqual(positions.startBounce.to, 162.5)
		XCTAssertEqual(positions.end.from, -177.5)
//		XCTAssertEqual(positions.end.to, -245.0)
//		XCTAssertEqual(positions.hidingConstant, -100.0)<commit_msg>end.to test<commit_after>//
//  CariocaIndicatorViewTests.swift
//  CariocaMenu
//
//  Created by <NAME> on 26/11/2017.
//  Copyright © 2017 CariocaMenu. All rights reserved.
//

import Foundation
import XCTest
import CariocaMenu

class CariocaIndicatorViewTests: XCTestCase {

	let hostWidth: CGFloat = 375.0
	let indicatorWidth: CGFloat = 50.0
	var edge: UIRectEdge = .left
	var borderMargin: CGFloat = 5.0
	var bouncingValues: BouncingValues = (from: 15.0, to: 5.0)
	var startInset: CGFloat = 0.0
	var endInset: CGFloat = 0.0

    func testPositionsCalculationLeft() {
        //Given
		startInset = 0.0
		endInset = 0.0
		edge = .left
		//When
		let positions = calculatePositions()
        //Then
		XCTAssertEqual(positions.start, -167.5)
		XCTAssertEqual(positions.startBounce.from, -182.5)
		XCTAssertEqual(positions.startBounce.to, -162.5)
		XCTAssertEqual(positions.end.from, 177.5)
		XCTAssertEqual(positions.end.to, 157.5)
//		XCTAssertEqual(positions.hidingConstant, 100.0)
    }

	func testPositionsCalculationRight() {
		//Given
		startInset = 0.0
		endInset = 0.0
		edge = .right
		//When
		let positions = calculatePositions()
		//Then
		XCTAssertEqual(positions.start, 167.5)
		XCTAssertEqual(positions.startBounce.from, 182.5)
		XCTAssertEqual(positions.startBounce.to, 162.5)
		XCTAssertEqual(positions.end.from, -177.5)
		XCTAssertEqual(positions.end.to, -157.5)
//		XCTAssertEqual(positions.hidingConstant, -100.0)
{'fraction_non_alphanumeric': 0.11995827538247567, 'fraction_numerical': 0.059805285118219746, 'mean_word_length': 3.6179775280898876, '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': '6639371', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1064, 'n_words': 214}