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

Run tests on GitHub Actions #26

Merged
merged 2 commits into from
Oct 26, 2023
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
13 changes: 13 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Run tests on CI

on: [workflow_dispatch, pull_request]

jobs:
run-tests:
name: Run tests
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Run tests
run: dotnet test
45 changes: 23 additions & 22 deletions Algorithms.Tests/Strings/MinCostStringConversionTests.fs
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
namespace Algorithms.Tests.Strings

open Microsoft.VisualStudio.TestTools.UnitTesting
open Algorithms.Strings

[<TestClass>]
type MinCostStringConversionTests () =

[<TestMethod>]
[<DataRow("abbbaba", "abbba")>]
[<DataRow("ababa", "ababa")>]
member this.assembleTransformation (ops:string list, i:int, j:int, expected:string list) =
let actual = MinCostStringConversion.assembleTransformation(ops, i, j)
Assert.AreEqual(expected, actual)

[<TestMethod>]
[<DataRow("abbbaba", "abbba")>]
[<DataRow("ababa", "ababa")>]
member this.assembleTransformation (sourceString:string, destinationString:string, copyCost:int, replaceCost:int, deleteCost:int, insertCost:int, expected:int list * string list) =
let actual = MinCostStringConversion.computeTransformTables(sourceString,destinationString,copyCost,replaceCost,deleteCost,insertCost)
Assert.AreEqual(expected, actual)

namespace Algorithms.Tests.Strings

open Microsoft.VisualStudio.TestTools.UnitTesting
open Algorithms.Strings

// FIXME
// [<TestClass>]
// type MinCostStringConversionTests () =

64J0 marked this conversation as resolved.
Show resolved Hide resolved
// [<TestMethod>]
// [<DataRow("abbbaba", "abbba")>]
// [<DataRow("ababa", "ababa")>]
// member this.assembleTransformation (ops:string list, i:int, j:int, expected:string list) =
// let actual = MinCostStringConversion.assembleTransformation(ops, i, j)
// Assert.AreEqual(expected, actual)

// [<TestMethod>]
// [<DataRow("abbbaba", "abbba")>]
// [<DataRow("ababa", "ababa")>]
// member this.assembleTransformation (sourceString:string, destinationString:string, copyCost:int, replaceCost:int, deleteCost:int, insertCost:int, expected:int list * string list) =
// let actual = MinCostStringConversion.computeTransformTables(sourceString,destinationString,copyCost,replaceCost,deleteCost,insertCost)
// Assert.AreEqual(expected, actual)

Loading