#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  long long tc, n, c0, c1, h;
  cin >> tc;
  string s;
  for (long long cs = 1; cs <= tc; ++cs) {
    cin >> n >> c0 >> c1 >> h;
    cin >> s;
    long long one, zero;
    one = zero = 0;
    for (long long i = 0; i < n; i++) {
      if (s[i] == '0')
        zero++;
      else
        one++;
    }
    long long ans = zero * c0 + one * c1, val;
    for (long long i = 0; i <= zero; i++) {
      val = i * h + (zero - i) * c0 + (one + i) * c1;
      ans = min(ans, val);
    }
    for (long long i = 0; i <= one; i++) {
      val = i * h + (one - i) * c1 + (zero + i) * c0;
      ans = min(ans, val);
    }
    cout << ans << "\n";
  }
  return 0;
}
