Skip to content

'Diamond' test run fails without error message #36

Description

@ThorstenReichert

For the Diamond exercise in F#, the submission below fails with an empty error message, stating only "We received the following error when we ran your code", but no actual reason.

image

Looking at the dev console in my browser, I see multiple calls to the "test_run_ endpoint returning

{"test_run":null}

with status 304. If I modify my submission slightly by defining

let space = '.' // instead of let space = ' '

then I receive a "test_run" response with status 200 and some expected test failure messages (after some empty 304s as above).

The code submission:

module Diamond

let alphabet = [|'A'..'Z'|]
let space = ' '

let createUpperHalfRow row size =
    let center = size / 2
    if row = 0 then
        Array.init size (fun i -> if i = center then alphabet.[row] else space)
    else
        Array.init size (fun i -> if i = center - row || i = center + row then alphabet.[row] else space)


let createUpperHalf size =
    Array.init (size / 2 + 1) (fun i -> createUpperHalfRow i size)

let mirrorLowerHalf upperHalf =
    let length = Array.length upperHalf
    Array.init (length - 1) (fun i -> upperHalf.[length - i - 2])

let make letter = 
    let size = (Array.findIndex ((=) letter) alphabet) * 2 + 1
    let upperHalf = createUpperHalf size
    let lowerHalf = mirrorLowerHalf upperHalf

    lowerHalf
    |> Array.append upperHalf
    |> Array.map System.String
    |> String.concat System.Environment.NewLine

Activity

  1. ErikSchierboom commented on Nov 12, 2021

    @ErikSchierboom
    Member
  2. ErikSchierboom commented on Nov 17, 2021

    @ErikSchierboom
    Member

    @ThorstenReichert We've just deployed a fix. Could you verify that re-running the tests now works for you?

  3. ThorstenReichert commented on Nov 17, 2021

    @ThorstenReichert
    Author

    @ErikSchierboom Works for me, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions