Documentation

FT106 (micro failure)

Back to documentation index
{
  "@context": "https://nxdlang.org/schema",
  "doc_id": "PT105",
  "title": "PT105 - Intentional Failures",
  "description": "Intentional Test Failures",
  "layer": "Passed Tests",
  "category": "Passed Tests - Nim",
  "keywords": [Nim, Pass, Test],
  "doc_version": "1.0",
  "status": "active"
}

# FT106 (micro failure)

### NXD Sample:

```nxd
MODULE TEST

FUNC MAIN();
    RETURN 1 ADD 2
    
```

### Result:

PASS

### Expected Output:

FAIL - 

### Expected Rejection Stage:

[ ] Lexer
[ ] Parser
[ ] AST
[ ] IR
[ ] Semantics
[ ] Backend


### Actual Output:

```json
{
  "module": {
    "name": "TEST",
    "imports": []
  },
  "types": [],
  "traits": [],
  "impls": [],
  "functions": [
    {
      "name": "MAIN",
      "params": [],
      "return_type": null,
      "body": [
        {
          "Return": {
            "Binary": {
              "kind": "ADD",
              "left": {
                "Literal": {
                  "Int": 1
                }
              },
              "right": {
                "Literal": {
                  "Int": 2
                }
              }
            }
          }
        }
      ]
    }
  ],
  "statements": []
}
```

```nim
# test


proc main() =
  return 1 + 2

```

### Notes: