<commit_before>package ca.ualberta.lard.test;

import ca.ualberta.lard.MainActivity;
import ca.ualberta.lard.model.GeoLocation;
import android.test.ActivityInstrumentationTestCase2;

public class GeoLocationModelTests extends
		ActivityInstrumentationTestCase2<MainActivity> {

	public GeoLocationModelTests() {
		super(MainActivity.class);
	}

	protected void setUp() throws Exception {
		super.setUp();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}
	
	public void testPreconditions() {
		fail();
		
	}
	
	public void testDistanceFrom() {
		fail();
	}
	
	/*  I commented this out because GeoLocation(9999) breaks the code
	public void testSerialization() {
		GeoLocation geoLocation = new GeoLocation(9999);
		String string = geoLocation.toJSON();
		GeoLocation newGeoLocation = geoLocation.fromJSON(string);
		
		assertEquals("newGeoLocation lat should be the same", geoLocation.getLatitude(), newGeoLocation.getLatitude());
		assertEquals("newGeoLocation lon should be the same", geoLocation.getLongitude(), newGeoLocation.getLongitude());
		assertEquals("newGeoLocation long should be 60.0", 60.0, newGeoLocation.getLongitude());
		assertEquals("newGeoLocation lat should be 60.0", 60.0, newGeoLocation.getLatitude());
	}
	*/
	
}<commit_msg>Added more GeoLocation Tests<commit_after>package ca.ualberta.lard.test;

import ca.ualberta.lard.MainActivity;
import ca.ualberta.lard.model.GeoLocation;
import android.test.ActivityInstrumentationTestCase2;

public class GeoLocationModelTests extends
		ActivityInstrumentationTestCase2<MainActivity> {

	public GeoLocationModelTests() {
		super(MainActivity.class);
	}

	protected void setUp() throws Exception {
		super.setUp();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}
	
	public void testPreconditions() {
		fail();
		
	}
	
	public void testDistanceFrom() {
		GeoLocation geoLocation1 = new GeoLocation(60.0, 60.0);
		GeoLocation geoLocation2 = new GeoLocation(60.0, 80.0);
		
		double distance1 = geoLocation1.distanceFrom(geoLocation2);
		double distance2 = geoLocation2.distanceFrom(geoLocation1);
		
		assertEquals("The Distance should be the same", distance1, distance2);
	}
	
	public void testConstructor() {
		GeoLocation geoLocation = new GeoLocation(60.0, 70.0);
		assertEquals("newGeoLocation long should be 70.0", 70.0, geoLocation.getLongitude());
		assertEquals("newGeoLocation lat should be 60.0", 60.0, geoLocation.getLatitude());
	}
	  
	public void testSerialization() {
		GeoLocation geoLocation = new GeoLocation(60.0, 70.0);
		String string = geoLocation.toJSON();
		GeoLocation newGeoLocation = geoLocation.fromJSON(string);
		
		assertEquals("newGeoLocation lat should be the same", geoLocation.getLatitude(), newGeoLocation.getLatitude());
		assertEquals("newGeoLocation lon should be the same", geoLocation.getLongitude(), newGeoLocation.getLongitude());
		assertEquals("newGeoLocation long should be 70.0", 70.0, newGeoLocation.getLongitude());
		assertEquals("newGeoLocation lat should be 60.0", 60.0, newGeoLocation.getLatitude());
	}
	
	
}
{'fraction_non_alphanumeric': 0.1073170731707317, 'fraction_numerical': 0.02666666666666667, 'mean_word_length': 5.475789473684211, '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': '3871988', 'n_tokens_mistral': 1058, 'n_tokens_neox': 916, 'n_words': 216}