home.social

#filepath — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #filepath, aggregated by home.social.

fetched live
  1. Generic XCTest assertions produce vague failure messages. Building custom assertion helpers with #filePath and #line preserves accurate failure locations while producing much clearer diagnostics. Small technique with outsized value for test quality.

    🔗: qualitycoding.org/swift-test-a by Jon Reid (@qcoding)

    #Swift #Testing #iOSDev

  2. Generic XCTest assertions produce vague failure messages. Building custom assertion helpers with #filePath and #line preserves accurate failure locations while producing much clearer diagnostics. Small technique with outsized value for test quality.

    🔗: qualitycoding.org/swift-test-a by Jon Reid (@qcoding)

    #Swift #Testing #iOSDev

  3. Generic XCTest assertions produce vague failure messages. Building custom assertion helpers with #filePath and #line preserves accurate failure locations while producing much clearer diagnostics. Small technique with outsized value for test quality.

    🔗: qualitycoding.org/swift-test-a by Jon Reid (@qcoding)

    #Swift #Testing #iOSDev

  4. Generic XCTest assertions produce vague failure messages. Building custom assertion helpers with #filePath and #line preserves accurate failure locations while producing much clearer diagnostics. Small technique with outsized value for test quality.

    🔗: qualitycoding.org/swift-test-a by Jon Reid (@qcoding)

    #Swift #Testing #iOSDev

  5. Can anyone point me to an online Java compiler which runs the JDK on Windows? I only find Linux systems.

    I would be particularly interested in what

    java.nio.file.Path.of("a/b/c")

    returns on a Windows system. My hunch is that it is the same as

    java.nio.file.Path.of("a\\b\\c")

    because the forward slash, afair, also works as a path separator. Or is the forward slash merely a no-go character like ':' and many others?

    #java #windows #filepath #filename

  6. Can anyone point me to an online Java compiler which runs the JDK on Windows? I only find Linux systems.

    I would be particularly interested in what

    java.nio.file.Path.of("a/b/c")

    returns on a Windows system. My hunch is that it is the same as

    java.nio.file.Path.of("a\\b\\c")

    because the forward slash, afair, also works as a path separator. Or is the forward slash merely a no-go character like ':' and many others?

    #java #windows #filepath #filename

  7. Can anyone point me to an online Java compiler which runs the JDK on Windows? I only find Linux systems.

    I would be particularly interested in what

    java.nio.file.Path.of("a/b/c")

    returns on a Windows system. My hunch is that it is the same as

    java.nio.file.Path.of("a\\b\\c")

    because the forward slash, afair, also works as a path separator. Or is the forward slash merely a no-go character like ':' and many others?

    #java #windows #filepath #filename

  8. Can anyone point me to an online Java compiler which runs the JDK on Windows? I only find Linux systems.

    I would be particularly interested in what

    java.nio.file.Path.of("a/b/c")

    returns on a Windows system. My hunch is that it is the same as

    java.nio.file.Path.of("a\\b\\c")

    because the forward slash, afair, also works as a path separator. Or is the forward slash merely a no-go character like ':' and many others?

    #java #windows #filepath #filename

  9. Can anyone point me to an online Java compiler which runs the JDK on Windows? I only find Linux systems.

    I would be particularly interested in what

    java.nio.file.Path.of("a/b/c")

    returns on a Windows system. My hunch is that it is the same as

    java.nio.file.Path.of("a\\b\\c")

    because the forward slash, afair, also works as a path separator. Or is the forward slash merely a no-go character like ':' and many others?

    #java #windows #filepath #filename

  10. @nicklockwood The old assertions take

    file: StaticString = #filePath, line: UInt = #line

    The new ones are slightly different (String and Int), plus the extra fileID & column

  11. @nicklockwood The old assertions take

    file: StaticString = #filePath, line: UInt = #line

    The new ones are slightly different (String and Int), plus the extra fileID & column

  12. @nicklockwood The old assertions take

    file: StaticString = #filePath, line: UInt = #line

    The new ones are slightly different (String and Int), plus the extra fileID & column

  13. @nicklockwood The old assertions take

    file: StaticString = #filePath, line: UInt = #line

    The new ones are slightly different (String and Int), plus the extra fileID & column

  14. @nicklockwood The old assertions take

    file: StaticString = #filePath, line: UInt = #line

    The new ones are slightly different (String and Int), plus the extra fileID & column

  15. @polpielladev
    Yeah, thats what I meant. As I have very simple Packages and the only difference between them is the name, I now use this trick to dynamically generate the name of the package from its foldername:

    let name = String(#filePath.split(separator: "/").reversed()[1])

    This way, all the package.swift files are identical.

  16. @polpielladev
    Yeah, thats what I meant. As I have very simple Packages and the only difference between them is the name, I now use this trick to dynamically generate the name of the package from its foldername:

    let name = String(#filePath.split(separator: "/").reversed()[1])

    This way, all the package.swift files are identical.

  17. @polpielladev
    Yeah, thats what I meant. As I have very simple Packages and the only difference between them is the name, I now use this trick to dynamically generate the name of the package from its foldername:

    let name = String(#filePath.split(separator: "/").reversed()[1])

    This way, all the package.swift files are identical.

  18. @polpielladev
    Yeah, thats what I meant. As I have very simple Packages and the only difference between them is the name, I now use this trick to dynamically generate the name of the package from its foldername:

    let name = String(#filePath.split(separator: "/").reversed()[1])

    This way, all the package.swift files are identical.

  19. @polpielladev
    Yeah, thats what I meant. As I have very simple Packages and the only difference between them is the name, I now use this trick to dynamically generate the name of the package from its foldername:

    let name = String(#filePath.split(separator: "/").reversed()[1])

    This way, all the package.swift files are identical.

  20. TIL that how GitHub figures out syntax highlighting for Swift files is one huge plist file of 5000 lines maintained by TextMate and pulled in as a submodule into linguist. Hopefully this PR should also add proper syntax highlighting for `#filePath`: github.com/textmate/swift.tmbu