Skip to content

Commit

Permalink
Rename 'Astroid' (the math object type) to 'Asteroid' (the celestial …
Browse files Browse the repository at this point in the history
…object type) (#13)
  • Loading branch information
samkrishna authored May 20, 2022
1 parent 448c495 commit 27b5a1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//
// Astroid.swift
// Asteroid.swift
//
//
// Created by Vincent Smithers on 13.02.21.
//

import Foundation

/// Models select Astroids available in the IPL.
public enum Astroid: Int32 {
/// Models select Asteroids available in the IPL.
public enum Asteroid: Int32 {
case chiron = 15
case pholus
case ceres
Expand All @@ -19,7 +19,7 @@ public enum Astroid: Int32 {

// MARK: - CelestialBody Conformance

extension Astroid: CelestialBody {
extension Asteroid: CelestialBody {
public var value: Int32 {
rawValue
}
Expand Down
16 changes: 8 additions & 8 deletions Tests/SwissEphemerisTests/CelestialBodyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ final class CelestialBodyTests: XCTestCase {
XCTAssertEqual(Int(moonCoordinate.second), 16)
}

func testAstroids() throws {
func testAsteroids() throws {
let date = try XCTUnwrap(Mock.date(from: "2021-03-01T12:31:00-0800"))
let chiron = Coordinate<Astroid>(body: .chiron, date: date)
let chiron = Coordinate<Asteroid>(body: .chiron, date: date)
XCTAssertEqual(Int(chiron.degree), 7)
XCTAssertEqual(chiron.sign, .aries)
let pholus = Coordinate<Astroid>(body: .pholus, date: date)
let pholus = Coordinate<Asteroid>(body: .pholus, date: date)
XCTAssertEqual(Int(pholus.degree), 5)
XCTAssertEqual(pholus.sign, .capricorn)
let ceres = Coordinate<Astroid>(body: .ceres, date: date)
let ceres = Coordinate<Asteroid>(body: .ceres, date: date)
XCTAssertEqual(Int(ceres.degree), 3)
XCTAssertEqual(ceres.sign, .aries)
let pallas = Coordinate<Astroid>(body: .pallas, date: date)
let pallas = Coordinate<Asteroid>(body: .pallas, date: date)
XCTAssertEqual(Int(pallas.degree), 28)
XCTAssertEqual(pallas.sign, .aquarius)
let juno = Coordinate<Astroid>(body: .juno, date: date)
let juno = Coordinate<Asteroid>(body: .juno, date: date)
XCTAssertEqual(Int(juno.degree), 19)
XCTAssertEqual(juno.sign, .sagittarius)
let vesta = Coordinate<Astroid>(body: .vesta, date: date)
let vesta = Coordinate<Asteroid>(body: .vesta, date: date)
XCTAssertEqual(Int(vesta.degree), 15)
XCTAssertEqual(vesta.sign, .virgo)
}
Expand Down Expand Up @@ -338,7 +338,7 @@ final class CelestialBodyTests: XCTestCase {
("testSunZodiacCoordinate",testSunZodiacCoordinate,
"testMoonSiderealCoordinate", testMoonSiderealCoordinate,
"testPlanets", testPlanets,
"testAstroids", testAstroids,
"testAsteroids", testAsteroids,
"testZodiac", testZodiac,
"testLunarNodes", testLunarNodes,
"testAscendent", testAscendent,
Expand Down

0 comments on commit 27b5a1d

Please sign in to comment.