#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, c0, c1, h;
    cin >> n >> c0 >> c1 >> h;
    string s;
    cin >> s;
    int cnt0 = 0, cnt1 = 0;
    for (int i = 0; i < s.size(); ++i) {
      if (s[i] == '0')
        ++cnt0;
      else
        ++cnt1;
    }
    int ans = 0;
    if (c0 < c1) {
      ans += (c0 * cnt0);
      for (int i = 0; i < cnt1; ++i) ans += min(c1, c0 + h);
    } else {
      ans += (c1 * cnt1);
      for (int i = 0; i < cnt0; ++i) ans += min(c0, c1 + h);
    }
    cout << ans << '\n';
  }
}
