Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgade to [email protected] #299

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions bsc-plugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bsc-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@types/node": "^14.18.41",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"brighterscript": "^1.0.0-alpha.36",
"brighterscript": "^1.0.0-alpha.38",
"chai": "^4.2.0",
"chai-subset": "^1.6.0",
"coveralls": "^3.0.0",
Expand Down
3 changes: 0 additions & 3 deletions bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ export class CodeCoverageProcessor {
ForEachStatement: (ds, parent, owner, key) => {
this.addStatement(ds);
ds.tokens.forEach.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: for each`;
},
ExitWhileStatement: (ds, parent, owner, key) => {

},
PrintStatement: (ds, parent, owner, key) => {
this.addStatement(ds);
Expand Down
8 changes: 5 additions & 3 deletions bsc-plugin/src/lib/rooibos/RawCodeExpression.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { BscFile,
WalkOptions,
WalkVisitor } from 'brighterscript';
import type { BscFile, WalkOptions, WalkVisitor } from 'brighterscript';
import { Expression } from 'brighterscript';
import * as brighterscript from 'brighterscript';
import type { BrsTranspileState } from 'brighterscript/dist/parser/BrsTranspileState';
Expand Down Expand Up @@ -33,4 +31,8 @@ export class RawCodeExpression extends Expression {
public walk(visitor: WalkVisitor, options: WalkOptions) {
//nothing to walk
}

public clone() {
return new RawCodeExpression(this.source, this.sourceFile, brighterscript.util.cloneLocation({ range: this.range } as any).range);
}
}
8 changes: 8 additions & 0 deletions bsc-plugin/src/lib/rooibos/RawCodeStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export class RawCodeStatement extends Statement {
public walk(visitor: WalkVisitor, options: WalkOptions) {
//nothing to walk
}

public clone() {
return new RawCodeStatement(this.source, this.sourceFile, util.cloneLocation({ range: this.range } as any).range);
}
}

export class RawCodeExpression extends Expression {
Expand Down Expand Up @@ -81,4 +85,8 @@ export class RawCodeExpression extends Expression {
public walk(visitor: WalkVisitor, options: WalkOptions) {
//nothing to walk
}

public clone() {
return new RawCodeExpression(this.source, this.sourceFile, util.cloneLocation({ range: this.range } as any).range);
}
}
1 change: 0 additions & 1 deletion bsc-plugin/src/lib/rooibos/TestSuiteBuilder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,6 @@ end namespace
@suite("Rooibos assertion tests")
class AssertionTests extends rooibos.BaseTestSuite
@describe("group1")

@it("one")
@params("http://google.com/thing", true)
@params("#'_!!@#%", false)
Expand Down
4 changes: 3 additions & 1 deletion bsc-plugin/src/lib/rooibos/TestSuiteBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
import type {
BrsFile,
ClassStatement,
FunctionStatement,
MethodStatement
} from 'brighterscript';
import {
isFunctionStatement,
isMethodStatement,
util
} from 'brighterscript';
Expand Down Expand Up @@ -203,7 +205,7 @@ export class TestSuiteBuilder {

let sanitizedTestName = this.sanitizeFunctionName(this.currentGroup.name) + '_' + this.sanitizeFunctionName(annotation.name);
statement.tokens.name.text = sanitizedTestName;
statement.func.functionStatement.tokens.name.text = sanitizedTestName;
statement.func.findAncestor<MethodStatement>(isMethodStatement).tokens.name.text = sanitizedTestName;

if (numberOfParams > 0) {
let index = 0;
Expand Down