Skip to content

Commit

Permalink
Merge pull request #12 from JosueMolinaMorales/josuemorales/0.1.1-beta
Browse files Browse the repository at this point in the history
v0.1.1-beta
  • Loading branch information
JosueMolinaMorales committed Apr 10, 2024
2 parents e771e62 + 6302012 commit ac49bfb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Types of changes
- **Fixed** for any bug fixes.
- **Security** in case of vulnerabilities.

## [0.1.1-beta] - 2024-09-05

### Fixed

- Fixed bug where tool would crash because of missing kotlin types in the AST. This was caused by the tool being moved to the most recent version of `kotlin-tree-sitter` without updating the AST types in the mutation operators. The version of `kotlin-tree-sitter` has been downgraded to the previous version to fix this issue. Will come back to this issue in a future release.
- Fixed a bug where the tool would crash because of unwrapping a null value while trying to fine `LabelRemoveOperator` mutations. This was cause by a bad condition in an if statement.
- Fixed an issue where string literals were not mutated correctly.

## [0.1.0-beta] - 2024-09-04

Welcome to the first release of Mutant-Kraken! This is a beta release, so please report any issues you find.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mutant-kraken"
version = "0.1.0-beta"
version = "0.1.1-beta"
edition = "2021"

[[bin]]
Expand All @@ -24,7 +24,7 @@ serde = { version = "1", features = ["derive"] }
tracing = "0.1.37"
tracing-subscriber = "0.3.16"
tree-sitter = "0.20.9"
tree-sitter-kotlin = "0.3.5"
tree-sitter-kotlin = "0.2.11"
uuid = { version = "1.3.0", features = ["v4", "serde"] }
wait-timeout = "0.2.0"
regex = "1.8.1"
Expand Down
8 changes: 4 additions & 4 deletions src/mutation_tool/operators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,9 @@ impl MutationOperators {

// If the value is not a label, return
if !val.contains("@")
&& !val.starts_with("return")
&& !val.starts_with("continue")
&& !val.starts_with("break")
&& (!val.starts_with("return")
|| !val.starts_with("continue")
|| !val.starts_with("break"))
{
return;
}
Expand Down Expand Up @@ -632,7 +632,7 @@ impl MutationOperators {
// Recurse down to the literal
self.mutate_literal(node, mutations_made, file_name)
}
KotlinTypes::StringLiteral => {
KotlinTypes::StringLiteral | KotlinTypes::LineStringLiteral => {
// Replace the string with a different string
let val = r#""Hello I am a Mutant!""#.to_string();

Expand Down

0 comments on commit ac49bfb

Please sign in to comment.