File tree Expand file tree Collapse file tree
Sources/SwiftAstro/StarCatalog Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,8 +106,15 @@ private extension SwiftAstro.StarNamesCatalog {
106106 }
107107
108108 var bayerGreek : String ?
109- if let greek: String = line. cols ( 56 , 5 ) , greek != " _ " {
110- bayerGreek = greek
109+ if let greek: String = line. cols ( 56 , 5 ) ,
110+ greek != " _ " ,
111+ greek. cols ( 1 , 1 ) != " V "
112+ {
113+ if let flamsteed = Int ( greek) {
114+ designations. append ( . flamsteed( number: flamsteed) )
115+ } else {
116+ bayerGreek = greek
117+ }
111118 }
112119
113120 if let hip: String = line. cols ( 91 , 6 ) , let number = Int ( hip) {
Original file line number Diff line number Diff line change @@ -52,4 +52,22 @@ final class StarNamesCatalogTests: XCTestCase {
5252 XCTAssertNil ( wds? . component)
5353 }
5454
55+ func testStarNamesMerope( ) throws {
56+ let snc = SwiftAstro . StarNamesCatalog ( )
57+ let merope = try XCTUnwrap ( snc. findByName ( " Merope " ) )
58+
59+ XCTAssertEqual ( merope. name, " Merope " )
60+ XCTAssertNil ( merope. bayerGreek)
61+ XCTAssertEqual ( merope. flamsteedNumber, 23 )
62+ }
63+
64+ func testStarNamesPhoenicia( ) throws {
65+ let snc = SwiftAstro . StarNamesCatalog ( )
66+ let phoenicia = try XCTUnwrap ( snc. findByName ( " Phoenicia " ) )
67+
68+ XCTAssertEqual ( phoenicia. name, " Phoenicia " )
69+ XCTAssertNil ( phoenicia. bayerGreek)
70+ XCTAssertEqual ( phoenicia. variableNumber, 1703 )
71+ }
72+
5573}
You can’t perform that action at this time.
0 commit comments