#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, a, b;
    string s;
    cin >> n >> a >> b >> s;
    long long pillar = 0, pipe = 0;
    vector<vector<long long> > dp(n + 5, vector<long long>(2));
    s += '0';
    dp[0][0] = b;
    dp[0][1] = inf;
    for (long long i = 1; i <= n; i++) {
      dp[i][0] = (s[i - 1] == '1' || s[i] == '1')
                     ? inf
                     : min(dp[i - 1][0] + a + b, dp[i - 1][1] + b + (a << 1));
      dp[i][1] =
          min(dp[i - 1][1] + 2ll * b + a, dp[i - 1][0] + b * 2ll + 2ll * a);
    }
    cout << dp[n][0] << '\n';
  }
}
